private void writePixels(String chunk, byte[] stream, int x, int y, int width, int height) throws FormatException, IOException MetadataRetrieve r = getMetadataRetrieve(); int sizeC = getSamplesPerPixel(); String type = r.getPixelsType(series).toString();
private void writePixels(String chunk, byte[] stream, int x, int y, int width, int height) throws FormatException, IOException MetadataRetrieve r = getMetadataRetrieve(); int sizeC = getSamplesPerPixel(); String type = r.getPixelsType(series).toString();
/** * @see loci.formats.IFormatWriter#saveBytes(int, byte[], int, int, int, int) */ @Override public void saveBytes(int no, byte[] buf, int x, int y, int w, int h) throws FormatException, IOException { checkParams(no, buf, x, y, w, h); if (!isFullPlane(x, y, w, h)) { throw new FormatException( "APNGWriter does not yet support saving image tiles."); } MetadataRetrieve meta = getMetadataRetrieve(); int width = meta.getPixelsSizeX(series).getValue().intValue(); int height = meta.getPixelsSizeY(series).getValue().intValue(); out.seek(footerPointer); if (!initialized[series][no]) { writeFCTL(width, height); if (numFrames == 0) writePLTE(); initialized[series][no] = true; } writePixels(numFrames == 0 ? "IDAT" : "fdAT", buf, x, y, w, h); numFrames++; writeFooter(); }
/** * @see loci.formats.IFormatWriter#saveBytes(int, byte[], int, int, int, int) */ @Override public void saveBytes(int no, byte[] buf, int x, int y, int w, int h) throws FormatException, IOException { checkParams(no, buf, x, y, w, h); if (!isFullPlane(x, y, w, h)) { throw new FormatException( "APNGWriter does not yet support saving image tiles."); } MetadataRetrieve meta = getMetadataRetrieve(); int width = meta.getPixelsSizeX(series).getValue().intValue(); int height = meta.getPixelsSizeY(series).getValue().intValue(); out.seek(footerPointer); if (!initialized[series][no]) { writeFCTL(width, height); if (numFrames == 0) writePLTE(); initialized[series][no] = true; } writePixels(numFrames == 0 ? "IDAT" : "fdAT", buf, x, y, w, h); numFrames++; writeFooter(); }
numFrames = 0; MetadataRetrieve r = getMetadataRetrieve(); int width = r.getPixelsSizeX(series).getValue().intValue(); int height = r.getPixelsSizeY(series).getValue().intValue();
numFrames = 0; MetadataRetrieve r = getMetadataRetrieve(); int width = r.getPixelsSizeX(series).getValue().intValue(); int height = r.getPixelsSizeY(series).getValue().intValue();