readPlane(s, x, y, w, h, buf); if (decodeHeight < getSizeY() && decodeHeight % 8 != 0) { decodeHeight += 8 - (decodeHeight % 8); lastImage = decode(stream, getSizeX(), decodeHeight); readPlane(pix, x, y, w, h, buf); if (y + h < getSizeY()) { lastImage = null; lastImage = openBytes(0); lastImageRow = getSizeY(); byte[] newImage = null; try (PNGInputStream stream = new PNGInputStream("fdAT", no)) { newImage = decode(stream, coords[2], coords[3]); int bpp = FormatTools.getBytesPerPixel(getPixelType()); int len = coords[2] * bpp; int plane = getSizeX() * getSizeY() * bpp; int newPlane = len * coords[3]; if (!isInterleaved()) { for (int c=0; c<getRGBChannelCount(); c++) { for (int row=0; row<coords[3]; row++) { System.arraycopy(newImage, c * newPlane + row * len, lastImage, c * plane + (coords[1] + row) * getSizeX() * bpp + coords[0] * bpp, len);
addGlobalMeta("Loop count", loop); m.pixelType = getBitsPerPixel() <= 8 ? FormatTools.UINT8 : FormatTools.UINT16; m.rgb = getSizeC() > 1; m.sizeT = getImageCount(); m.interleaved = isRGB(); m.falseColor = false; MetadataStore store = makeFilterMetadata(); MetadataTools.populatePixels(store, this);
int bpp = FormatTools.getBytesPerPixel(getPixelType()); int rowLen = width * getRGBChannelCount() * bpp; if (getBitsPerPixel() < bpp * 8) { int div = (bpp * 8) / getBitsPerPixel(); if (div < rowLen) { int originalRowLen = rowLen; unfilter(filters, image, width, height); int nRowBlocks = getSizeY() / 8; int nColBlocks = getSizeX() / 8; if (8 * nRowBlocks != getSizeY()) { nRowBlocks++; if (8 * nColBlocks != getSizeX()) { nColBlocks++; int extraCols = getSizeX() - (nColBlocks - 1) * 8; switch (extraCols) { case 1: int rowSize = passWidth * bpp * getRGBChannelCount(); if (nRowBlocks * 8 != getSizeY() && row >= PASS_HEIGHTS[i] * (nRowBlocks - 1)) { int extraRows = getSizeY() - (nRowBlocks - 1) * 8; switch (extraRows) { case 1:
getRGBChannelCount() * FormatTools.getBytesPerPixel(getPixelType()); int rowLen = width * bpp; for (int row=0; row<height; row++) {
case PNG: file = "tile.png"; reader = new APNGReader(); case BMP: if (reader == null) {
addGlobalMeta("Loop count", loop); m.pixelType = getBitsPerPixel() <= 8 ? FormatTools.UINT8 : FormatTools.UINT16; m.rgb = getSizeC() > 1; m.sizeT = getImageCount(); m.interleaved = isRGB(); m.falseColor = false; MetadataStore store = makeFilterMetadata(); MetadataTools.populatePixels(store, this);
int bpp = FormatTools.getBytesPerPixel(getPixelType()); int rowLen = width * getRGBChannelCount() * bpp; if (getBitsPerPixel() < bpp * 8) { int div = (bpp * 8) / getBitsPerPixel(); if (div < rowLen) { int originalRowLen = rowLen; unfilter(filters, image, width, height); int nRowBlocks = getSizeY() / 8; int nColBlocks = getSizeX() / 8; if (8 * nRowBlocks != getSizeY()) { nRowBlocks++; if (8 * nColBlocks != getSizeX()) { nColBlocks++; int extraCols = getSizeX() - (nColBlocks - 1) * 8; switch (extraCols) { case 1: int rowSize = passWidth * bpp * getRGBChannelCount(); if (nRowBlocks * 8 != getSizeY() && row >= PASS_HEIGHTS[i] * (nRowBlocks - 1)) { int extraRows = getSizeY() - (nRowBlocks - 1) * 8; switch (extraRows) { case 1:
getRGBChannelCount() * FormatTools.getBytesPerPixel(getPixelType()); int rowLen = width * bpp; for (int row=0; row<height; row++) {
case PNG: file = "tile.png"; reader = new APNGReader(); case BMP: if (reader == null) {
readPlane(s, x, y, w, h, buf); if (decodeHeight < getSizeY() && decodeHeight % 8 != 0) { decodeHeight += 8 - (decodeHeight % 8); lastImage = decode(stream, getSizeX(), decodeHeight); readPlane(pix, x, y, w, h, buf); if (y + h < getSizeY()) { lastImage = null; lastImage = openBytes(0); lastImageRow = getSizeY(); byte[] newImage = null; try (PNGInputStream stream = new PNGInputStream("fdAT", no)) { newImage = decode(stream, coords[2], coords[3]); int bpp = FormatTools.getBytesPerPixel(getPixelType()); int len = coords[2] * bpp; int plane = getSizeX() * getSizeY() * bpp; int newPlane = len * coords[3]; if (!isInterleaved()) { for (int c=0; c<getRGBChannelCount(); c++) { for (int row=0; row<coords[3]; row++) { System.arraycopy(newImage, c * newPlane + row * len, lastImage, c * plane + (coords[1] + row) * getSizeX() * bpp + coords[0] * bpp, len);