Class BitmapResource

java.lang.Object
ghidra.program.model.data.BitmapResource
Direct Known Subclasses:
IconResource

public class BitmapResource extends Object
  • Field Details

    • size

      protected int size
    • sizeImage

      protected int sizeImage
    • rawSizeImage

      protected int rawSizeImage
    • height

      protected int height
    • rowOrder

      protected int rowOrder
  • Constructor Details

  • Method Details

    • getMaskLength

      public int getMaskLength()
      Returns:
      int size of mask section in bytes
    • getSize

      public int getSize()
    • getWidth

      public int getWidth()
    • getHeight

      public int getHeight()
    • getPlanes

      public int getPlanes()
    • getBitCount

      public int getBitCount()
    • getCompression

      public int getCompression()
    • getRawSizeImage

      public int getRawSizeImage()
      Get the raw image data size as contained within this resource. If compressed, this will be smaller than the value returned by getImageDataSize() which reflects the uncompressed size.
      Returns:
      raw image data size
    • getImageDataSize

      public int getImageDataSize()
      Returns the uncompressed image data size. The default implementation will return the image data size specified by the header if non-zero, otherwize a computed data length will be returned based upon getHeight(), getWidth() and getBitCount().
      Returns:
      image data size
    • getComputedUncompressedImageDataSize

      protected int getComputedUncompressedImageDataSize()
      Compute the uncompressed image data size based upon getHeight(), getWidth() and getBitCount().
      Returns:
      computed image data size
    • getXPelsPerMeter

      public int getXPelsPerMeter()
    • getYPelsPerMeter

      public int getYPelsPerMeter()
    • getClrUsed

      public int getClrUsed()
    • getClrImportant

      public int getClrImportant()
    • getPixelData

      public byte[] getPixelData(MemBuffer buf)
    • getRGBData

      public int[] getRGBData(MemBuffer buf)
    • getColorMap

      public int[] getColorMap(MemBuffer buf)
    • getColorMapLength

      public int getColorMapLength()
      Returns:
      int
    • getDataImage

      public DataImage getDataImage(MemBuffer buf)
      Returns:
      DataImage
    • get32PlaneImage

      protected DataImage get32PlaneImage(MemBuffer buf)
      Parameters:
      buf -
      Returns:
      DataImage
    • get18PlaneImage

      protected DataImage get18PlaneImage(MemBuffer buf)
      Parameters:
      buf -
      Returns:
      DataImage
    • getEightPlaneImage

      protected DataImage getEightPlaneImage(MemBuffer buf)
      Parameters:
      buf -
      Returns:
      DataImage
    • getFourPlaneImage

      protected DataImage getFourPlaneImage(MemBuffer buf)
      Parameters:
      buf -
      Returns:
      DataImage
    • getOnePlaneImage

      protected DataImage getOnePlaneImage(MemBuffer buf)
      Parameters:
      buf -
      Returns:
      DataImage
    • getPixelData

      protected void getPixelData(MemBuffer buf, byte[] dbuf)
      Parameters:
      buf -
      dbuf -