Skip to content

Commit

Permalink
Fix CodecOptions construction so that JPEG2000 quality can be set
Browse files Browse the repository at this point in the history
  • Loading branch information
melissalinkert committed Mar 29, 2024
1 parent f014149 commit f7de051
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
import loci.formats.MinMaxCalculator;
import loci.formats.MissingLibraryException;
import loci.formats.codec.CodecOptions;
import loci.formats.codec.JPEG2000CodecOptions;
import loci.formats.gui.Index16ColorModel;
import loci.formats.in.DynamicMetadataOptions;
import loci.formats.meta.IMetadata;
Expand Down Expand Up @@ -1279,7 +1280,7 @@ private boolean overwriteCheck(String path, boolean throwOnExist) throws IOExcep

private void setCodecOptions(IFormatWriter writer) {
if (compressionQuality != null) {
CodecOptions codecOptions = CodecOptions.getDefaultOptions();
CodecOptions codecOptions = JPEG2000CodecOptions.getDefaultOptions();
codecOptions.quality = compressionQuality;
writer.setCodecOptions(codecOptions);
}
Expand Down

0 comments on commit f7de051

Please sign in to comment.