/** * @see loci.formats.IFormatReader#openBytes(int, byte[], int, int, int, int) */ @Override public byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h) throws FormatException, IOException { FormatTools.checkPlaneParameters(this, no, buf.length, x, y, w, h); in.seek(pixelOffset); if (FormatTools.getPlaneSize(this) * 2 + in.getFilePointer() < in.length()) { readPlane(in, x, y, w, h, buf); return buf; } byte[] b = new LZOCodec().decompress(in, null); try (RandomAccessInputStream s = new RandomAccessInputStream(b)) { s.seek(0); readPlane(s, x, y, w, h, buf); } return buf; }
/** * @see loci.formats.IFormatReader#openBytes(int, byte[], int, int, int, int) */ @Override public byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h) throws FormatException, IOException { FormatTools.checkPlaneParameters(this, no, buf.length, x, y, w, h); in.seek(pixelOffset); if (FormatTools.getPlaneSize(this) * 2 + in.getFilePointer() < in.length()) { readPlane(in, x, y, w, h, buf); return buf; } byte[] b = new LZOCodec().decompress(in, null); try (RandomAccessInputStream s = new RandomAccessInputStream(b)) { s.seek(0); readPlane(s, x, y, w, h, buf); } return buf; }
byte[] b = new LZOCodec().decompress(pix, null); pix.skipBytes(4); v.write(b);
byte[] b = new LZOCodec().decompress(pix, null); pix.skipBytes(4); v.write(b);
while (in.getFilePointer() < in.length()) { try { byte[] b = new LZOCodec().decompress(in, null); if (b.length > 0 && (b.length % (getSizeX() * getSizeY())) == 0) { int bytes = b.length / (getSizeX() * getSizeY());
while (in.getFilePointer() < in.length()) { try { byte[] b = new LZOCodec().decompress(in, null); if (b.length > 0 && (b.length % (getSizeX() * getSizeY())) == 0) { int bytes = b.length / (getSizeX() * getSizeY());
options.bitsPerSample = bytes * 8; options.maxBytes = getSizeX() * getSizeY() * bytes; b = new LZOCodec().decompress(b, options);
options.bitsPerSample = bytes * 8; options.maxBytes = getSizeX() * getSizeY() * bytes; b = new LZOCodec().decompress(b, options);