Skip to content

Commit

Permalink
Merge pull request #4057 from melissalinkert/disable-chroma-subsampling
Browse files Browse the repository at this point in the history
Add CodecOptions.disableChromaSubsampling
  • Loading branch information
dgault authored Dec 11, 2023
2 parents d26b7e7 + 569d970 commit 6d7692d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand All @@ -142,6 +149,7 @@ public CodecOptions(CodecOptions options) {
this.tileGridXOffset = options.tileGridXOffset;
this.tileGridYOffset = options.tileGridYOffset;
this.ycbcr = options.ycbcr;
this.disableChromaSubsampling = options.disableChromaSubsampling;
}
}

Expand All @@ -154,6 +162,7 @@ public static CodecOptions getDefaultOptions() {
options.interleaved = false;
options.lossless = true;
options.ycbcr = false;
options.disableChromaSubsampling = false;
return options;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6d7692d

Please sign in to comment.