Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CodecOptions.disableChromaSubsampling #4057

Merged
merged 2 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading