Package ghidra.program.model.data
Class BitmapResource
- java.lang.Object
-
- ghidra.program.model.data.BitmapResource
-
- Direct Known Subclasses:
IconResource
public class BitmapResource extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected int
height
protected int
rawSizeImage
protected int
rowOrder
protected int
size
protected int
sizeImage
-
Constructor Summary
Constructors Constructor Description BitmapResource(MemBuffer buf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected DataImage
get18PlaneImage(MemBuffer buf)
protected DataImage
get32PlaneImage(MemBuffer buf)
int
getBitCount()
int
getClrImportant()
int
getClrUsed()
int[]
getColorMap(MemBuffer buf)
int
getColorMapLength()
int
getCompression()
protected int
getComputedUncompressedImageDataSize()
Compute the uncompressed image data size based upon getHeight(), getWidth() and getBitCount().DataImage
getDataImage(MemBuffer buf)
protected DataImage
getEightPlaneImage(MemBuffer buf)
protected DataImage
getFourPlaneImage(MemBuffer buf)
int
getHeight()
int
getImageDataSize()
Returns the uncompressed image data size.int
getMaskLength()
protected DataImage
getOnePlaneImage(MemBuffer buf)
byte[]
getPixelData(MemBuffer buf)
protected void
getPixelData(MemBuffer buf, byte[] dbuf)
int
getPlanes()
int
getRawSizeImage()
Get the raw image data size as contained within this resource.int[]
getRGBData(MemBuffer buf)
int
getSize()
int
getWidth()
int
getXPelsPerMeter()
int
getYPelsPerMeter()
-
-
-
Constructor Detail
-
BitmapResource
public BitmapResource(MemBuffer buf) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
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 bygetImageDataSize()
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
-
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
-
-
-