Class JPEGImage
java.lang.Object
com.jogamp.opengl.util.texture.spi.JPEGImage
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the bytes per pixelReturns the color space of the pixel dataint
Returns the number of components of the pixel datagetData()
Returns the raw data for this texture in the correct (bottom-to-top) order for calls to glTexImage2D.int
Returns the OpenGL format for this texture; e.g.int
Returns the OpenGL data type: GL.GL_UNSIGNED_BYTE.boolean
Returns true if data has the channels reversed to BGR or BGRA, otherwise RGB or RGBA is expected.int
Returns the height of the image.int
getWidth()
Returns the width of the image.static JPEGImage
read
(InputStream in) Reads a JPEG image from the specified InputStream, using theTextureData.ColorSpace.RGB
.static JPEGImage
read
(InputStream in, TextureData.ColorSpace cs) Reads a JPEG image from the specified InputStream, using the given color space for storage.toString()
-
Method Details
-
read
Reads a JPEG image from the specified InputStream, using the given color space for storage.- Parameters:
in
-cs
- Storage color space, eitherTextureData.ColorSpace.RGB
orTextureData.ColorSpace.YCbCr
.TextureData.ColorSpace.YCCK
andTextureData.ColorSpace.CMYK
will throw an exception!- Returns:
- Throws:
IOException
-
read
Reads a JPEG image from the specified InputStream, using theTextureData.ColorSpace.RGB
.- Throws:
IOException
-
getColorSpace
Returns the color space of the pixel data -
getComponentCount
public int getComponentCount()Returns the number of components of the pixel data -
getWidth
public int getWidth()Returns the width of the image. -
getHeight
public int getHeight()Returns the height of the image. -
getHasReversedChannels
public boolean getHasReversedChannels()Returns true if data has the channels reversed to BGR or BGRA, otherwise RGB or RGBA is expected. -
getGLFormat
public int getGLFormat()Returns the OpenGL format for this texture; e.g. GL.GL_LUMINANCE, GL.GL_RGB or GL.GL_RGBA. -
getGLType
public int getGLType()Returns the OpenGL data type: GL.GL_UNSIGNED_BYTE. -
getBytesPerPixel
public int getBytesPerPixel()Returns the bytes per pixel -
getData
Returns the raw data for this texture in the correct (bottom-to-top) order for calls to glTexImage2D. -
toString
-