/** Decodes a strip of data. */ public byte[] decompress(byte[] input, CodecOptions options) throws FormatException, IOException { if (codec == null) { throw new UnsupportedCompressionException( "Sorry, " + getCodecName() + " compression mode is not supported"); } return codec.decompress(input, options); }
/** Encodes a strip of data. */ public byte[] compress(byte[] input, CodecOptions options) throws FormatException, IOException { if (codec == null) { throw new FormatException( "Sorry, " + getCodecName() + " compression mode is not supported"); } return codec.compress(input, options); }
/** Decodes a strip of data. */ public byte[] decompress(byte[] input, CodecOptions options) throws FormatException, IOException { if (codec == null) { throw new UnsupportedCompressionException( "Sorry, " + getCodecName() + " compression mode is not supported"); } return codec.decompress(input, options); }
/** Encodes a strip of data. */ public byte[] compress(byte[] input, CodecOptions options) throws FormatException, IOException { if (codec == null) { throw new FormatException( "Sorry, " + getCodecName() + " compression mode is not supported"); } return codec.compress(input, options); }
case JPEG: Codec codec = new JPEGCodec(); buf = codec.decompress(ets, options); break; case JPEG_2000: codec = new JPEG2000Codec(); buf = codec.decompress(ets, options); break; case JPEG_LOSSLESS: codec = new LosslessJPEGCodec(); buf = codec.decompress(ets, options); break; case PNG:
case JPEG: Codec codec = new JPEGCodec(); buf = codec.decompress(ets, options); break; case JPEG_2000: codec = new JPEG2000Codec(); buf = codec.decompress(ets, options); break; case JPEG_LOSSLESS: codec = new LosslessJPEGCodec(); buf = codec.decompress(ets, options); break; case PNG:
if (isJPEG) codec = new JPEGCodec(); else codec = new JPEG2000Codec(); b = codec.decompress(b, options);
if (isJPEG) codec = new JPEGCodec(); else codec = new JPEG2000Codec(); b = codec.decompress(b, options);
options.interleaved = true; options.maxBytes = (int) secondOffset; byte[] t = codec.decompress(in, options); options.interleaved = true; options.maxBytes = (int) secondOffset; byte[] t = codec.decompress(in, options); availableBytes = t.length;
options.interleaved = true; options.maxBytes = (int) secondOffset; byte[] t = codec.decompress(in, options); options.interleaved = true; options.maxBytes = (int) secondOffset; byte[] t = codec.decompress(in, options); availableBytes = t.length;
byte[] t = null; try { t = codec.decompress(in, options);
byte[] t = null; try { t = codec.decompress(in, options);
int index = channelOrder[getSeries() - 1][c]; tag.seek(layerOffset[offsetIndex + index]); pix.write(codec.decompress(tag, options));
int index = channelOrder[getSeries() - 1][c]; tag.seek(layerOffset[offsetIndex + index]); pix.write(codec.decompress(tag, options));