JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.opengl.util.awt.ImageUtil Class Reference

Utilities for dealing with images. More...

Collaboration diagram for com.jogamp.opengl.util.awt.ImageUtil:

Static Public Member Functions

static void flipImageVertically (final BufferedImage image)
 Flips the supplied BufferedImage vertically. More...
 
static BufferedImage createCompatibleImage (final int width, final int height)
 Creates a BufferedImage with a pixel format compatible with the graphics environment. More...
 
static BufferedImage createThumbnail (final BufferedImage image, final int thumbWidth)
 Creates a thumbnail from an image. More...
 

Detailed Description

Utilities for dealing with images.

Definition at line 47 of file ImageUtil.java.

Member Function Documentation

◆ createCompatibleImage()

static BufferedImage com.jogamp.opengl.util.awt.ImageUtil.createCompatibleImage ( final int  width,
final int  height 
)
static

Creates a BufferedImage with a pixel format compatible with the graphics environment.

The returned image can thus benefit from hardware accelerated operations in Java2D API.

Parameters
widthThe width of the image to be created
heightThe height of the image to be created
Returns
A instance of BufferedImage with a type compatible with the graphics card.

Definition at line 76 of file ImageUtil.java.

Here is the caller graph for this function:

◆ createThumbnail()

static BufferedImage com.jogamp.opengl.util.awt.ImageUtil.createThumbnail ( final BufferedImage  image,
final int  thumbWidth 
)
static

Creates a thumbnail from an image.

A thumbnail is a scaled down version of the original picture. This method will retain the width to height ratio of the original picture and return a new instance of BufferedImage. The original picture is not modified.

Parameters
imageThe original image to sample down
thumbWidthThe width of the thumbnail to be created
Exceptions
IllegalArgumentExceptionIf thumbWidth is greater than image.getWidth()
Returns
A thumbnail with the requested width or the original picture if thumbWidth = image.getWidth()

Definition at line 95 of file ImageUtil.java.

Here is the call graph for this function:

◆ flipImageVertically()

static void com.jogamp.opengl.util.awt.ImageUtil.flipImageVertically ( final BufferedImage  image)
static

Flips the supplied BufferedImage vertically.

This is often a necessary conversion step to display a Java2D image correctly with OpenGL and vice versa.

Definition at line 53 of file ImageUtil.java.

Here is the caller graph for this function:

The documentation for this class was generated from the following file: