diff --git a/components/formats-api/src/loci/formats/codec/CodecOptions.java b/components/formats-api/src/loci/formats/codec/CodecOptions.java index ada5ff7fd7b..fef1fdfd4a0 100644 --- a/components/formats-api/src/loci/formats/codec/CodecOptions.java +++ b/components/formats-api/src/loci/formats/codec/CodecOptions.java @@ -117,6 +117,13 @@ public class CodecOptions { */ public boolean ycbcr; + /** + * Whether or not to use chroma subsampling. + * Only used when creating an image (WRITE). + * Default is false (use chroma subsampling). + */ + public boolean disableChromaSubsampling; + // -- Constructors -- /** Construct a new CodecOptions. */ @@ -142,6 +149,7 @@ public CodecOptions(CodecOptions options) { this.tileGridXOffset = options.tileGridXOffset; this.tileGridYOffset = options.tileGridYOffset; this.ycbcr = options.ycbcr; + this.disableChromaSubsampling = options.disableChromaSubsampling; } } @@ -154,6 +162,7 @@ public static CodecOptions getDefaultOptions() { options.interleaved = false; options.lossless = true; options.ycbcr = false; + options.disableChromaSubsampling = false; return options; } diff --git a/components/formats-bsd/src/loci/formats/codec/WrappedCodec.java b/components/formats-bsd/src/loci/formats/codec/WrappedCodec.java index 5c1293043f1..40208aac382 100644 --- a/components/formats-bsd/src/loci/formats/codec/WrappedCodec.java +++ b/components/formats-bsd/src/loci/formats/codec/WrappedCodec.java @@ -156,6 +156,7 @@ private static void copyOptions(CodecOptions src, ome.codecs.CodecOptions dest) dest.tileGridXOffset = src.tileGridXOffset; dest.tileGridYOffset = src.tileGridYOffset; dest.ycbcr = src.ycbcr; + dest.disableChromaSubsampling = src.disableChromaSubsampling; } protected static ome.codecs.CodecOptions getOptions(CodecOptions options)