Package ghidra.program.model.data
Class BitmapResource
java.lang.Object
ghidra.program.model.data.BitmapResource
- Direct Known Subclasses:
IconResource
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected intprotected intprotected intprotected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DataImageget18PlaneImage(MemBuffer buf) protected DataImageget32PlaneImage(MemBuffer buf) intintintint[]getColorMap(MemBuffer buf) intintprotected intCompute the uncompressed image data size based upon getHeight(), getWidth() and getBitCount().getDataImage(MemBuffer buf) protected DataImageprotected DataImageintintReturns the uncompressed image data size.intprotected DataImagebyte[]getPixelData(MemBuffer buf) protected voidgetPixelData(MemBuffer buf, byte[] dbuf) intintGet the raw image data size as contained within this resource.int[]getRGBData(MemBuffer buf) intgetSize()intgetWidth()intint
-
Field Details
-
size
protected int size -
sizeImage
protected int sizeImage -
rawSizeImage
protected int rawSizeImage -
height
protected int height -
rowOrder
protected int rowOrder
-
-
Constructor Details
-
BitmapResource
- Throws:
IOException
-
-
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 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
-
getRGBData
-
getColorMap
-
getColorMapLength
public int getColorMapLength()- Returns:
- int
-
getDataImage
- Returns:
- DataImage
-
get32PlaneImage
- Parameters:
buf-- Returns:
- DataImage
-
get18PlaneImage
- Parameters:
buf-- Returns:
- DataImage
-
getEightPlaneImage
- Parameters:
buf-- Returns:
- DataImage
-
getFourPlaneImage
- Parameters:
buf-- Returns:
- DataImage
-
getOnePlaneImage
- Parameters:
buf-- Returns:
- DataImage
-
getPixelData
- Parameters:
buf-dbuf-
-