Class WinBMPFileFormat
java.lang.Object
org.eclipse.swt.internal.image.FileFormat
org.eclipse.swt.internal.image.FileFormat.StaticImageFileFormat
org.eclipse.swt.internal.image.WinBMPFileFormat
-
Nested Class Summary
Nested classes/interfaces inherited from class FileFormat
FileFormat.StaticImageFileFormat -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final int(package private) static final int(package private) static final int(package private) static final int(package private) static final int(package private) static final int(package private) int(package private) PointFields inherited from class FileFormat
compression, DEFAULT_ZOOM, inputStream, loader, outputStream -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) intcompress(int comp, byte[] src, int srcOffset, int numBytes, byte[] dest, boolean last) Compress numBytes bytes of image data from src, storing in dest (starting at 0), using the technique specified by comp.(package private) intcompressRLE4Data(byte[] src, int srcOffset, int numBytes, byte[] dest, boolean last) (package private) intcompressRLE8Data(byte[] src, int srcOffset, int numBytes, byte[] dest, boolean last) (package private) voidconvertPixelsToBGR(ImageData image, byte[] dest) (package private) voiddecompressData(byte[] src, byte[] dest, int stride, int cmp) (package private) intdecompressRLE4Data(byte[] src, int numBytes, int stride, byte[] dest, int destSize) (package private) intdecompressRLE8Data(byte[] src, int numBytes, int stride, byte[] dest, int destSize) (package private) voidflipScanLines(byte[] data, int stride, int height) (package private) booleanisFileFormat(LEDataInputStream stream) Return whether or not the specified input stream represents a supported file format.(package private) booleanisPaletteBMP(PaletteData pal, int depth) (package private) byte[]loadData(byte[] infoHeader) (package private) byte[]loadData(byte[] infoHeader, int stride) (package private) int[](package private) ImageData[](package private) PaletteDataloadPalette(byte[] infoHeader) (package private) PaletteDatapaletteFromBytes(byte[] bytes, int numColors) (package private) static byte[]Answer a byte array containing the BMP representation of the given device independent palette.(package private) intunloadData(ImageData image, byte[] data, OutputStream out, int comp) Unload the given image's data into the given byte stream using the given compression strategy.(package private) intunloadDataNoCompression(ImageData image, byte[] data, OutputStream out) Prepare the given image's data for unloading into a byte stream using no compression strategy.(package private) voidunloadIntoByteStream(ImageLoader loader) Unload a DeviceIndependentImage using Windows .BMP format into the given byte stream.Methods inherited from class FileFormat.StaticImageFileFormat
loadFromByteStream, loadFromByteStreamBySizeMethods inherited from class FileFormat
canLoadAtZoom, isDynamicallySizableFormat, load, load, loadFromStream, loadFromStreamBySize, save, unloadIntoStream
-
Field Details
-
BMPFileHeaderSize
static final int BMPFileHeaderSize- See Also:
-
BMPHeaderFixedSize
static final int BMPHeaderFixedSize- See Also:
-
BI_RGB
static final int BI_RGB- See Also:
-
BI_RLE8
static final int BI_RLE8- See Also:
-
BI_RLE4
static final int BI_RLE4- See Also:
-
BI_BITFIELDS
static final int BI_BITFIELDS- See Also:
-
importantColors
int importantColors -
pelsPerMeter
Point pelsPerMeter
-
-
Constructor Details
-
WinBMPFileFormat
public WinBMPFileFormat()
-
-
Method Details
-
compress
int compress(int comp, byte[] src, int srcOffset, int numBytes, byte[] dest, boolean last) Compress numBytes bytes of image data from src, storing in dest (starting at 0), using the technique specified by comp. If last is true, this indicates the last line of the image. Answer the size of the compressed data. -
compressRLE4Data
int compressRLE4Data(byte[] src, int srcOffset, int numBytes, byte[] dest, boolean last) -
compressRLE8Data
int compressRLE8Data(byte[] src, int srcOffset, int numBytes, byte[] dest, boolean last) -
convertPixelsToBGR
-
decompressData
void decompressData(byte[] src, byte[] dest, int stride, int cmp) -
decompressRLE4Data
int decompressRLE4Data(byte[] src, int numBytes, int stride, byte[] dest, int destSize) -
decompressRLE8Data
int decompressRLE8Data(byte[] src, int numBytes, int stride, byte[] dest, int destSize) -
isFileFormat
Description copied from class:FileFormatReturn whether or not the specified input stream represents a supported file format.- Specified by:
isFileFormatin classFileFormat- Throws:
IOException
-
isPaletteBMP
-
loadData
byte[] loadData(byte[] infoHeader) -
loadData
byte[] loadData(byte[] infoHeader, int stride) -
loadFileHeader
int[] loadFileHeader() -
loadFromByteStream
ImageData[] loadFromByteStream()- Specified by:
loadFromByteStreamin classFileFormat.StaticImageFileFormat
-
loadPalette
-
paletteFromBytes
-
paletteToBytes
Answer a byte array containing the BMP representation of the given device independent palette. -
unloadData
Unload the given image's data into the given byte stream using the given compression strategy. Answer the number of bytes written. Method modified to use the passed data if it is not null. -
unloadDataNoCompression
Prepare the given image's data for unloading into a byte stream using no compression strategy. Answer the number of bytes written. Method modified to use the passed data if it is not null. -
unloadIntoByteStream
Unload a DeviceIndependentImage using Windows .BMP format into the given byte stream.- Specified by:
unloadIntoByteStreamin classFileFormat
-
flipScanLines
void flipScanLines(byte[] data, int stride, int height)
-