/** * Return JPEG2000CodecOptions using the given CodecOptions as the default. * @param options The specified options. */ public static JPEG2000CodecOptions getDefaultOptions(CodecOptions options) { JPEG2000CodecOptions j2kOptions = new JPEG2000CodecOptions(options); j2kOptions.quality = j2kOptions.lossless ? Double.MAX_VALUE : 10; j2kOptions.codeBlockSize = new int[] {64, 64}; j2kOptions.writeBox = true; return j2kOptions; }
/** * Return JPEG2000CodecOptions using the given CodecOptions as the default. * @param options The specified options. */ public static JPEG2000CodecOptions getDefaultOptions(CodecOptions options) { JPEG2000CodecOptions j2kOptions = new JPEG2000CodecOptions(options); j2kOptions.quality = j2kOptions.lossless ? Double.MAX_VALUE : 10; j2kOptions.codeBlockSize = new int[] {64, 64}; j2kOptions.writeBox = true; return j2kOptions; }
/** * Sets the resolution level when we have JPEG 2000 compressed data. * @param ifd The active IFD that is being used in our current * <code>openBytes()</code> calling context. It will be the sub-resolution * IFD if <code>currentSeries > 0</code>. */ protected void setResolutionLevel(IFD ifd) { if (tiffParser == null) { initTiffParser(); } if (j2kCodecOptions == null) { j2kCodecOptions = new JPEG2000CodecOptions(); } j2kCodecOptions.resolution = Math.abs(getCoreIndex() - resolutionLevels); LOGGER.debug("Using JPEG 2000 resolution level {}", j2kCodecOptions.resolution); tiffParser.setCodecOptions(j2kCodecOptions); }
/** * Sets the resolution level when we have JPEG 2000 compressed data. * @param ifd The active IFD that is being used in our current * <code>openBytes()</code> calling context. It will be the sub-resolution * IFD if <code>currentSeries > 0</code>. */ protected void setResolutionLevel(IFD ifd) { if (tiffParser == null) { initTiffParser(); } if (j2kCodecOptions == null) { j2kCodecOptions = new JPEG2000CodecOptions(); } j2kCodecOptions.resolution = Math.abs(getCoreIndex() - resolutionLevels); LOGGER.debug("Using JPEG 2000 resolution level {}", j2kCodecOptions.resolution); tiffParser.setCodecOptions(j2kCodecOptions); }
options = new JPEG2000CodecOptions(options); options.width = w; options.height = h;
options = new JPEG2000CodecOptions(options); options.width = w; options.height = h;