Class StbImageInfo

java.lang.Object
org.ngengine.stbimage.StbImageInfo

public class StbImageInfo extends Object
Information about an image without fully decoding it.
  • Constructor Details

    • StbImageInfo

      public StbImageInfo(int width, int height, int channels, boolean is16Bit, StbImageInfo.ImageFormat format)
      Creates image metadata.
      Parameters:
      width - image width
      height - image height
      channels - channel count
      is16Bit - true for 16-bit source data
      format - 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 width
      height - image height
      channels - channel count
      is16Bit - true for 16-bit source data
      format - detected image format
      numFrames - 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

      public StbImageInfo.ImageFormat 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

      public String toString()
      Overrides:
      toString in class Object