Top Fields Constructors Methods
com.sun.javafx.iio.png

public final Class PNGImageLoader2

extends ImageLoaderImpl
Class Inheritance
Imports
com.sun.javafx.iio.*, com.sun.javafx.iio.common.*, java.io.*, java.nio.ByteBuffer, java.util.Arrays, java.util.zip.*

Field Summary

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

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private int
bpp()

private int
private void
copy(byte[] line, byte[] image, int pos, int step, int resultBpp)

private void
copy_plain(byte[] line, byte[] image, int pos, int step, int bpp)

private void
copyTrns_gray(byte[] line, byte[] image, int pos, int step)

private void
copyTrns_rgb(byte[] line, byte[] image, int pos, int step)

private ImageFrame
decodePalette(byte[] srcImage, ImageMetadata metadata)

public void
dispose()

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

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

private void
doAvrgFilter(byte[] line, byte[] pline, int bpp)

private void
doFilter(byte[] line, byte[] pline, int fType, int bpp)

private void
doPaethFilter(byte[] line, byte[] pline, int bpp)

private void
doSubFilter(byte[] line, int bpp)

private void
doUpFilter(byte[] line, byte[] pline)

private void
downsample16to8(byte[] line, byte[] image, int pos, int step, int bpp)

private void
downsample16to8_plain(byte[] line, byte[] image, int pos, int step, int bpp)

private void
downsample16to8trns_gray(byte[] line, byte[] image, int pos, int step)

private void
downsample16to8trns_rgb(byte[] line, byte[] image, int pos, int step)

private ImageStorage.ImageType
private void
load(byte[] image, InputStream data)

public ImageFrame
load(int imageIndex, double w, double h, boolean preserveAspectRatio, boolean smooth, float screenPixelScale, float imagePixelScale)

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

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

private void
loadMip(byte[] image, InputStream data, int mip)

private static int
mipPos(int pos, int mip, int[] start, int[] increment)

private static int
mipSize(int size, int mip, int[] start, int[] increment)

private static int
paethPr(int a, int b, int c)

private void
parsePaletteChunk(int chunkLength)

private int
private void
parseTransparencyChunk(int chunkLength)

private byte[]
readBytes(byte[] data)

private byte[]
readBytes(byte[] data, int offs, int size)

private int[]
private boolean
readGrayTransparency(int chunkLength)

private void
private void
readPaletteChunk(int chunkLength)

private boolean
readPaletteTransparency(int chunkLength)

private boolean
readRgbTransparency(int chunkLength)

private void
skip(int n)

private void
upsampleTo8(byte[] line, byte[] image, int pos, int w, int step, int bpp)

private void
upsampleTo8Gray(byte[] line, byte[] image, int pos, int w, int step)

private void
upsampleTo8GrayTrns(byte[] line, byte[] image, int pos, int w, int step)

private void
upsampleTo8Palette(byte[] line, byte[] image, int pos, int w, int step)

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

Field Detail

bitDepthback to summary
private int bitDepth
colorTypeback to summary
private int colorType
FILE_SIGback to summary
pack-priv static final byte[] FILE_SIG
heightback to summary
private int height
IDAT_TYPEback to summary
pack-priv static final int IDAT_TYPE
IEND_TYPEback to summary
pack-priv static final int IEND_TYPE
IHDR_TYPEback to summary
pack-priv static final int IHDR_TYPE
increment_xback to summary
private static final int[] increment_x
increment_yback to summary
private static final int[] increment_y
isInterlacedback to summary
private boolean isInterlaced
numBandsPerColorTypeback to summary
pack-priv static final int[] numBandsPerColorType
paletteback to summary
private byte[][] palette
PLTE_TYPEback to summary
pack-priv static final int PLTE_TYPE
PNG_COLOR_GRAYback to summary
pack-priv static final int PNG_COLOR_GRAY
PNG_COLOR_GRAY_ALPHAback to summary
pack-priv static final int PNG_COLOR_GRAY_ALPHA
PNG_COLOR_PALETTEback to summary
pack-priv static final int PNG_COLOR_PALETTE
PNG_COLOR_RGBback to summary
pack-priv static final int PNG_COLOR_RGB
PNG_COLOR_RGB_ALPHAback to summary
pack-priv static final int PNG_COLOR_RGB_ALPHA
PNG_FILTER_AVERAGEback to summary
pack-priv static final int PNG_FILTER_AVERAGE
PNG_FILTER_NONEback to summary
pack-priv static final int PNG_FILTER_NONE
PNG_FILTER_PAETHback to summary
pack-priv static final int PNG_FILTER_PAETH
PNG_FILTER_SUBback to summary
pack-priv static final int PNG_FILTER_SUB
PNG_FILTER_UPback to summary
pack-priv static final int PNG_FILTER_UP
starting_xback to summary
private static final int[] starting_x
starting_yback to summary
private static final int[] starting_y
streamback to summary
private final DataInputStream stream
tRNS_GRAY_RGBback to summary
private boolean tRNS_GRAY_RGB
tRNS_presentback to summary
private boolean tRNS_present
tRNS_TYPEback to summary
pack-priv static final int tRNS_TYPE
trnsBback to summary
private int trnsB
trnsGback to summary
private int trnsG
trnsRback to summary
private int trnsR
widthback to summary
private int width

Constructor Detail

PNGImageLoader2back to summary
public PNGImageLoader2(InputStream input) throws IOException

Method Detail

bppback to summary
private int bpp()
bytesPerColorback to summary
private int bytesPerColor()
copyback to summary
private void copy(byte[] line, byte[] image, int pos, int step, int resultBpp)
copy_plainback to summary
private void copy_plain(byte[] line, byte[] image, int pos, int step, int bpp)
copyTrns_grayback to summary
private void copyTrns_gray(byte[] line, byte[] image, int pos, int step)
copyTrns_rgbback to summary
private void copyTrns_rgb(byte[] line, byte[] image, int pos, int step)
decodePaletteback to summary
private ImageFrame decodePalette(byte[] srcImage, ImageMetadata metadata) throws IOException
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
doAvrgFilterback to summary
private void doAvrgFilter(byte[] line, byte[] pline, int bpp)
doFilterback to summary
private void doFilter(byte[] line, byte[] pline, int fType, int bpp)
doPaethFilterback to summary
private void doPaethFilter(byte[] line, byte[] pline, int bpp)
doSubFilterback to summary
private void doSubFilter(byte[] line, int bpp)
doUpFilterback to summary
private void doUpFilter(byte[] line, byte[] pline)
downsample16to8back to summary
private void downsample16to8(byte[] line, byte[] image, int pos, int step, int bpp)
downsample16to8_plainback to summary
private void downsample16to8_plain(byte[] line, byte[] image, int pos, int step, int bpp)
downsample16to8trns_grayback to summary
private void downsample16to8trns_gray(byte[] line, byte[] image, int pos, int step)
downsample16to8trns_rgbback to summary
private void downsample16to8trns_rgb(byte[] line, byte[] image, int pos, int step)
getTypeback to summary
private ImageStorage.ImageType getType()
loadback to summary
private void load(byte[] image, InputStream data) throws IOException
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.

Annotations
@Override
loadMipback to summary
private void loadMip(byte[] image, InputStream data, int mip) throws IOException
mipPosback to summary
private static int mipPos(int pos, int mip, int[] start, int[] increment)
mipSizeback to summary
private static int mipSize(int size, int mip, int[] start, int[] increment)
paethPrback to summary
private static int paethPr(int a, int b, int c)
parsePaletteChunkback to summary
private void parsePaletteChunk(int chunkLength) throws IOException
parsePngMetaback to summary
private int parsePngMeta() throws IOException
parseTransparencyChunkback to summary
private void parseTransparencyChunk(int chunkLength) throws IOException
readBytesback to summary
private byte[] readBytes(byte[] data) throws IOException
readBytesback to summary
private byte[] readBytes(byte[] data, int offs, int size) throws IOException
readChunkback to summary
private int[] readChunk() throws IOException
readGrayTransparencyback to summary
private boolean readGrayTransparency(int chunkLength) throws IOException
readHeaderback to summary
private void readHeader() throws IOException
readPaletteChunkback to summary
private void readPaletteChunk(int chunkLength) throws IOException
readPaletteTransparencyback to summary
private boolean readPaletteTransparency(int chunkLength) throws IOException
readRgbTransparencyback to summary
private boolean readRgbTransparency(int chunkLength) throws IOException
skipback to summary
private void skip(int n) throws IOException
upsampleTo8back to summary
private void upsampleTo8(byte[] line, byte[] image, int pos, int w, int step, int bpp)
upsampleTo8Grayback to summary
private void upsampleTo8Gray(byte[] line, byte[] image, int pos, int w, int step)
upsampleTo8GrayTrnsback to summary
private void upsampleTo8GrayTrns(byte[] line, byte[] image, int pos, int w, int step)
upsampleTo8Paletteback to summary
private void upsampleTo8Palette(byte[] line, byte[] image, int pos, int w, int step)