JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.opengl.util.PNGPixelRect Class Reference
Inheritance diagram for com.jogamp.opengl.util.PNGPixelRect:
Collaboration diagram for com.jogamp.opengl.util.PNGPixelRect:

Public Member Functions

 PNGPixelRect (final PixelFormat pixelformat, final DimensionImmutable size, final int strideInBytes, final boolean isGLOriented, final ByteBuffer pixels, final double dpiX, final double dpiY)
 Creates a PNGPixelRect from data supplied by the end user. More...
 
 PNGPixelRect (final PixelRectangle src, final double dpiX, final double dpiY)
 
double[] getDpi ()
 Returns the dpi of the image. More...
 
void write (final OutputStream outstream, final boolean closeOutstream) throws IOException
 
- Public Member Functions inherited from com.jogamp.nativewindow.util.PixelRectangle.GenericPixelRect
 GenericPixelRect (final PixelFormat pixelformat, final DimensionImmutable size, int strideInBytes, final boolean isGLOriented, final ByteBuffer pixels) throws IllegalArgumentException, IndexOutOfBoundsException
 
 GenericPixelRect (final PixelRectangle src) throws IllegalArgumentException, IndexOutOfBoundsException
 Copy ctor validating src. More...
 
int hashCode ()
 
PixelFormat getPixelformat ()
 Returns the PixelFormat. More...
 
DimensionImmutable getSize ()
 Returns the size, i.e. More...
 
int getStride ()
 Returns stride in byte-size, i.e. More...
 
boolean isGLOriented ()
 Returns true if the memory is laid out in OpenGL's coordinate system, origin at bottom left. More...
 
ByteBuffer getPixels ()
 Returns the pixels. More...
 
final String toString ()
 
int hashCode ()
 
PixelFormat getPixelformat ()
 Returns the PixelFormat. More...
 
DimensionImmutable getSize ()
 Returns the size, i.e. More...
 
int getStride ()
 Returns stride in byte-size, i.e. More...
 
boolean isGLOriented ()
 Returns true if the memory is laid out in OpenGL's coordinate system, origin at bottom left. More...
 
ByteBuffer getPixels ()
 Returns the pixels. More...
 
String toString ()
 

Static Public Member Functions

static PNGPixelRect read (final InputStream in, final PixelFormat ddestFmt, final boolean destDirectBuffer, final int destMinStrideInBytes, final boolean destIsGLOriented) throws IOException
 Reads a PNG image from the specified InputStream. More...
 
static void write (final PixelFormat pixelformat, final DimensionImmutable size, int strideInPixels, final boolean isGLOriented, final IntBuffer pixels, final double dpiX, final double dpiY, final OutputStream outstream, final boolean closeOutstream) throws IOException
 

Additional Inherited Members

- Protected Attributes inherited from com.jogamp.nativewindow.util.PixelRectangle.GenericPixelRect
final PixelFormat pixelformat
 
final DimensionImmutable size
 
final int strideInBytes
 
final boolean isGLOriented
 
final ByteBuffer pixels
 

Detailed Description

Definition at line 56 of file PNGPixelRect.java.

Constructor & Destructor Documentation

◆ PNGPixelRect() [1/2]

com.jogamp.opengl.util.PNGPixelRect.PNGPixelRect ( final PixelFormat  pixelformat,
final DimensionImmutable  size,
final int  strideInBytes,
final boolean  isGLOriented,
final ByteBuffer  pixels,
final double  dpiX,
final double  dpiY 
)

Creates a PNGPixelRect from data supplied by the end user.

Shares data with the passed ByteBuffer.

Parameters
pixelformat
size
strideInBytes
isGLOrientedsee isGLOriented().
pixels
dpiX
dpiY

Definition at line 290 of file PNGPixelRect.java.

Here is the caller graph for this function:

◆ PNGPixelRect() [2/2]

com.jogamp.opengl.util.PNGPixelRect.PNGPixelRect ( final PixelRectangle  src,
final double  dpiX,
final double  dpiY 
)

Definition at line 296 of file PNGPixelRect.java.

Member Function Documentation

◆ getDpi()

double[] com.jogamp.opengl.util.PNGPixelRect.getDpi ( )

Returns the dpi of the image.

Definition at line 303 of file PNGPixelRect.java.

◆ read()

static PNGPixelRect com.jogamp.opengl.util.PNGPixelRect.read ( final InputStream  in,
final PixelFormat  ddestFmt,
final boolean  destDirectBuffer,
final int  destMinStrideInBytes,
final boolean  destIsGLOriented 
) throws IOException
static

Reads a PNG image from the specified InputStream.

Implicitly converts the image to match the desired:

Parameters
ininput stream
destFmtdesired destination PixelFormat incl. conversion, maybe null to use source PixelFormat
destDirectBufferif true, using a direct NIO buffer, otherwise an array backed buffer
destMinStrideInBytesused if greater than PNG's stride, otherwise using PNG's stride. Stride is width * bytes-per-pixel.
destIsGLOriented
Returns
the newly created PNGPixelRect instance
Exceptions
IOException

Definition at line 78 of file PNGPixelRect.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write() [1/2]

void com.jogamp.opengl.util.PNGPixelRect.write ( final OutputStream  outstream,
final boolean  closeOutstream 
) throws IOException

Definition at line 305 of file PNGPixelRect.java.

Here is the call graph for this function:

◆ write() [2/2]

static void com.jogamp.opengl.util.PNGPixelRect.write ( final PixelFormat  pixelformat,
final DimensionImmutable  size,
int  strideInPixels,
final boolean  isGLOriented,
final IntBuffer  pixels,
final double  dpiX,
final double  dpiY,
final OutputStream  outstream,
final boolean  closeOutstream 
) throws IOException
static

Definition at line 347 of file PNGPixelRect.java.

Here is the call graph for this function:

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