|
JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java (public API).
|
Utilities for dealing with images. More...
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... | |
Utilities for dealing with images.
Definition at line 47 of file ImageUtil.java.
|
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.
| width | The width of the image to be created |
| height | The height of the image to be created |
BufferedImage with a type compatible with the graphics card. Definition at line 76 of file ImageUtil.java.
|
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.
| image | The original image to sample down |
| thumbWidth | The width of the thumbnail to be created |
| IllegalArgumentException | If thumbWidth is greater than image.getWidth() |
Definition at line 95 of file ImageUtil.java.
|
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.