mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 17:59:46 +02:00
GP-0: Certify and warning removal
This commit is contained in:
parent
03593e348d
commit
4c51d0e02c
1 changed files with 5 additions and 38 deletions
|
@ -83,10 +83,6 @@ public class BitmapResource {
|
||||||
BI_CMYKRLE4 = 0x000D
|
BI_CMYKRLE4 = 0x000D
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws IOException
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public BitmapResource(MemBuffer buf) throws IOException {
|
public BitmapResource(MemBuffer buf) throws IOException {
|
||||||
initialize(buf);
|
initialize(buf);
|
||||||
}
|
}
|
||||||
|
@ -275,9 +271,6 @@ public class BitmapResource {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return int
|
|
||||||
*/
|
|
||||||
public int getColorMapLength() {
|
public int getColorMapLength() {
|
||||||
if (bitCount == 32 || bitCount == 24) {
|
if (bitCount == 32 || bitCount == 24) {
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -285,9 +278,6 @@ public class BitmapResource {
|
||||||
return getClrUsed() * 4;
|
return getClrUsed() * 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return DataImage
|
|
||||||
*/
|
|
||||||
public DataImage getDataImage(MemBuffer buf) {
|
public DataImage getDataImage(MemBuffer buf) {
|
||||||
if (bitCount == 1) {
|
if (bitCount == 1) {
|
||||||
return getOnePlaneImage(buf);
|
return getOnePlaneImage(buf);
|
||||||
|
@ -326,10 +316,6 @@ public class BitmapResource {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param buf
|
|
||||||
* @return DataImage
|
|
||||||
*/
|
|
||||||
protected DataImage get32PlaneImage(MemBuffer buf) {
|
protected DataImage get32PlaneImage(MemBuffer buf) {
|
||||||
// create the color model
|
// create the color model
|
||||||
ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);
|
ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);
|
||||||
|
@ -353,10 +339,6 @@ public class BitmapResource {
|
||||||
return new BitmapDataImage(image);
|
return new BitmapDataImage(image);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param buf
|
|
||||||
* @return DataImage
|
|
||||||
*/
|
|
||||||
protected DataImage get18PlaneImage(MemBuffer buf) {
|
protected DataImage get18PlaneImage(MemBuffer buf) {
|
||||||
// create the color model
|
// create the color model
|
||||||
ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);
|
ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);
|
||||||
|
@ -380,10 +362,6 @@ public class BitmapResource {
|
||||||
return new BitmapDataImage(image);
|
return new BitmapDataImage(image);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param buf
|
|
||||||
* @return DataImage
|
|
||||||
*/
|
|
||||||
protected DataImage getEightPlaneImage(MemBuffer buf) {
|
protected DataImage getEightPlaneImage(MemBuffer buf) {
|
||||||
// create the color model
|
// create the color model
|
||||||
IndexColorModel model =
|
IndexColorModel model =
|
||||||
|
@ -398,10 +376,6 @@ public class BitmapResource {
|
||||||
return new BitmapDataImage(image);
|
return new BitmapDataImage(image);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param buf
|
|
||||||
* @return DataImage
|
|
||||||
*/
|
|
||||||
protected DataImage getFourPlaneImage(MemBuffer buf) {
|
protected DataImage getFourPlaneImage(MemBuffer buf) {
|
||||||
// create the color model
|
// create the color model
|
||||||
int[] colormapData = getRGBData(buf);
|
int[] colormapData = getRGBData(buf);
|
||||||
|
@ -416,10 +390,6 @@ public class BitmapResource {
|
||||||
return new BitmapDataImage(image);
|
return new BitmapDataImage(image);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param buf
|
|
||||||
* @return DataImage
|
|
||||||
*/
|
|
||||||
protected DataImage getOnePlaneImage(MemBuffer buf) {
|
protected DataImage getOnePlaneImage(MemBuffer buf) {
|
||||||
// create the color model
|
// create the color model
|
||||||
int[] colormapData = getRGBData(buf);
|
int[] colormapData = getRGBData(buf);
|
||||||
|
@ -435,10 +405,6 @@ public class BitmapResource {
|
||||||
return new BitmapDataImage(image);
|
return new BitmapDataImage(image);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param buf
|
|
||||||
* @param dbuf
|
|
||||||
*/
|
|
||||||
protected void getPixelData(MemBuffer buf, byte[] dbuf) {
|
protected void getPixelData(MemBuffer buf, byte[] dbuf) {
|
||||||
// int height = getHeight();
|
// int height = getHeight();
|
||||||
|
|
||||||
|
@ -493,6 +459,7 @@ public class BitmapResource {
|
||||||
|
|
||||||
private static class BitmapDecompressResult {
|
private static class BitmapDecompressResult {
|
||||||
final int rawDataSize;
|
final int rawDataSize;
|
||||||
|
@SuppressWarnings("unused")
|
||||||
final int decompressedDataSize;
|
final int decompressedDataSize;
|
||||||
final byte[] decompressedImageData; // may be null if not decompressed
|
final byte[] decompressedImageData; // may be null if not decompressed
|
||||||
|
|
||||||
|
@ -506,8 +473,8 @@ public class BitmapResource {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process compressed image data contained within the specified memory buffer.
|
* Process compressed image data contained within the specified memory buffer.
|
||||||
* @param mem memory buffer positioned to start of compressed image data
|
* @param buf memory buffer positioned to start of compressed image data
|
||||||
* @param out optional decompressed image data output stream
|
* @param offset the buffer offset
|
||||||
* @return BitmapDecompressResult result of decompression processing where decompressedImageData
|
* @return BitmapDecompressResult result of decompression processing where decompressedImageData
|
||||||
* will only be filled-in if returnDecompressedData is true;
|
* will only be filled-in if returnDecompressedData is true;
|
||||||
* @throws MemoryAccessException if decompression fails due to memory constraint
|
* @throws MemoryAccessException if decompression fails due to memory constraint
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue