Top Inners Fields Constructors Methods
com.sun.javafx.iio.bmp

pack-priv final Class BMPImageLoader

Located in compilation unit of com.sun.javafx.iio.bmp.BMPImageLoaderFactory.

extends ImageLoaderImpl
Class Inheritance

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static interface

Field Summary

Modifier and TypeField and Description
pack-priv static final int
pack-priv int
pack-priv int
pack-priv byte[]
pack-priv BitmapInfoHeader
pack-priv int[]
pack-priv int[]
pack-priv static final short
pack-priv final LEInputStream
Inherited from com.sun.javafx.iio.common.ImageLoaderImpl:
formatDescriptionlastPercentDonelisteners

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static void
BGRtoRGB(byte[] data, int pos, int size)

pack-priv static boolean
checkDisjointMasks(int m1, int m2, int m3)

private static byte
convertFrom5To8Bit(int i, int mask, int offset)

private static byte
convertFromXTo8Bit(int i, int mask, int offset)

public void
dispose()

Implements com.sun.javafx.iio.ImageLoader.dispose.

Disposes of any resources (such as native libraries) held by this loader.

private static int
getByte(byte[] buf, int pos)

private static int
getDWord(byte[] buf, int pos)

private static int
getWord(byte[] buf, int pos)

pack-priv static boolean
isPow2Minus1(int i)

public ImageFrame
load(int
the zero-relative index of the image to load.
imageIndex
,
double
the desired image width. If non-positive, an IllegalArgumentException will be thrown.
w
,
double
the desired image height. If non-positive, an IllegalArgumentException will be thrown.
h
,
boolean
whether to preserve the width-to-height ratio of the image.
preserveAspectRatio
,
boolean
whether to use a smooth downscaling algorithm.
smooth
,
float
screen pixel scale (used for variable-density images)
screenPixelScale
,
float
image pixel scale (used for fixed-density images)
imagePixelScale
)

Implements com.sun.javafx.iio.ImageLoader.load.

Loads the image at a given index in an image stream.

private void
private void
read16Bit(byte[] image, int rowLength, int hght, BMPImageLoader.BitConverter converter)

private void
read24Bit(byte[] image, int rowLength, int hght)

private void
read32BitBF(byte[] image, int rowLength, int hght)

private void
read32BitRGB(byte[] image, int rowLength, int hght)

private void
private void
readPackedBits(byte[] image, int rowLength, int hght)

private void
readRLE(byte[] image, int rowLength, int hght, boolean isRLE4)

private int
setRGBFromPalette(byte[] image, int dstOffset, int index)

Inherited from com.sun.javafx.iio.common.ImageLoaderImpl:
addListeneremitWarninggetFormatDescriptionremoveListenerupdateImageMetadataupdateImageProgress

Field Detail

BFH_SIZEback to summary
pack-priv static final int BFH_SIZE
bfOffBitsback to summary
pack-priv int bfOffBits
bfSizeback to summary
pack-priv int bfSize
bgra_paletteback to summary
pack-priv byte[] bgra_palette
bihback to summary
pack-priv BitmapInfoHeader bih
bitMasksback to summary
pack-priv int[] bitMasks
bitOffsetsback to summary
pack-priv int[] bitOffsets
BMback to summary
pack-priv static final short BM
databack to summary
pack-priv final LEInputStream data

Constructor Detail

BMPImageLoaderback to summary
pack-priv BMPImageLoader(InputStream input) throws IOException

Method Detail

BGRtoRGBback to summary
pack-priv static void BGRtoRGB(byte[] data, int pos, int size)
checkDisjointMasksback to summary
pack-priv static boolean checkDisjointMasks(int m1, int m2, int m3)
convertFrom5To8Bitback to summary
private static byte convertFrom5To8Bit(int i, int mask, int offset)
convertFromXTo8Bitback to summary
private static byte convertFromXTo8Bit(int i, int mask, int offset)
disposeback to summary
public void dispose()

Implements com.sun.javafx.iio.ImageLoader.dispose.

Doc from com.sun.javafx.iio.ImageLoader.dispose.

Disposes of any resources (such as native libraries) held by this loader. Any further invocation of any methods on this object are undefined.

Annotations
@Override
getByteback to summary
private static int getByte(byte[] buf, int pos)
getDWordback to summary
private static int getDWord(byte[] buf, int pos)
getWordback to summary
private static int getWord(byte[] buf, int pos)
isPow2Minus1back to summary
pack-priv static boolean isPow2Minus1(int i)
loadback to summary
public ImageFrame load(int imageIndex, double w, double h, boolean preserveAspectRatio, boolean smooth, float screenPixelScale, float imagePixelScale) throws IOException

Implements com.sun.javafx.iio.ImageLoader.load.

Doc from com.sun.javafx.iio.ImageLoader.load.

Loads the image at a given index in an image stream. If no image exists at that index null will be returned.

Parameters
imageIndex:int

the zero-relative index of the image to load.

w:double

the desired image width. If non-positive, an IllegalArgumentException will be thrown.

h:double

the desired image height. If non-positive, an IllegalArgumentException will be thrown.

preserveAspectRatio:boolean

whether to preserve the width-to-height ratio of the image.

smooth:boolean

whether to use a smooth downscaling algorithm.

screenPixelScale:float

screen pixel scale (used for variable-density images)

imagePixelScale:float

image pixel scale (used for fixed-density images)

Returns:ImageFrame

the image at the specified index or null on error.

Annotations
@Override
parseBitfieldsback to summary
private void parseBitfields() throws IOException
read16Bitback to summary
private void read16Bit(byte[] image, int rowLength, int hght, BMPImageLoader.BitConverter converter) throws IOException
read24Bitback to summary
private void read24Bit(byte[] image, int rowLength, int hght) throws IOException
read32BitBFback to summary
private void read32BitBF(byte[] image, int rowLength, int hght) throws IOException
read32BitRGBback to summary
private void read32BitRGB(byte[] image, int rowLength, int hght) throws IOException
readHeaderback to summary
private void readHeader() throws IOException
readPackedBitsback to summary
private void readPackedBits(byte[] image, int rowLength, int hght) throws IOException
readRLEback to summary
private void readRLE(byte[] image, int rowLength, int hght, boolean isRLE4) throws IOException
setRGBFromPaletteback to summary
private int setRGBFromPalette(byte[] image, int dstOffset, int index)
com.sun.javafx.iio.bmp back to summary

private Interface BMPImageLoader.BitConverter

Annotations
@FunctionalInterface

Method Summary

Modifier and TypeMethod and Description
public byte
convert(int i, int mask, int offset)

Method Detail

convertback to summary
public byte convert(int i, int mask, int offset)