Package org.ngengine.stbimage
Class StbImageInfo
java.lang.Object
org.ngengine.stbimage.StbImageInfo
Information about an image without fully decoding it.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumSupported image formats known by this decoder set. -
Constructor Summary
ConstructorsConstructorDescriptionStbImageInfo(int width, int height, int channels, boolean is16Bit, StbImageInfo.ImageFormat format) Creates image metadata.StbImageInfo(int width, int height, int channels, boolean is16Bit, StbImageInfo.ImageFormat format, int numFrames) Creates image metadata. -
Method Summary
Modifier and TypeMethodDescriptionintReturns channel count in decoded source/default representation.Returns the detected image format.intReturns image height in pixels.intReturns total frame count.intgetWidth()Returns image width in pixels.booleanis16Bit()Indicates whether source data is 16-bit per channel.toString()
-
Constructor Details
-
StbImageInfo
public StbImageInfo(int width, int height, int channels, boolean is16Bit, StbImageInfo.ImageFormat format) Creates image metadata.- Parameters:
width- image widthheight- image heightchannels- channel countis16Bit- true for 16-bit source dataformat- detected image format
-
StbImageInfo
public StbImageInfo(int width, int height, int channels, boolean is16Bit, StbImageInfo.ImageFormat format, int numFrames) Creates image metadata.- Parameters:
width- image widthheight- image heightchannels- channel countis16Bit- true for 16-bit source dataformat- detected image formatnumFrames- total frame count (1 for non-animated images)
-
-
Method Details
-
getWidth
public int getWidth()Returns image width in pixels.- Returns:
- width
-
getHeight
public int getHeight()Returns image height in pixels.- Returns:
- height
-
getChannels
public int getChannels()Returns channel count in decoded source/default representation.- Returns:
- channel count
-
is16Bit
public boolean is16Bit()Indicates whether source data is 16-bit per channel.- Returns:
- true for 16-bit
-
getFormat
Returns the detected image format.- Returns:
- format enum
-
getNumFrames
public int getNumFrames()Returns total frame count.- Returns:
- number of frames (1 for still images)
-
toString
-