-
-
Notifications
You must be signed in to change notification settings - Fork 851
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
Ensure jpeg encoder is immutable. #1779
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1779 +/- ##
==========================================
- Coverage 84.49% 84.49% -0.01%
==========================================
Files 849 849
Lines 37252 37251 -1
Branches 4385 4384 -1
==========================================
- Hits 31477 31475 -2
- Misses 4916 4917 +1
Partials 859 859
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few cosmetic suggestions, otherwise looks good!
/// returns <see langword="null"/> defering the field assignment | ||
/// to <see cref="InitQuantizationTables(int, JpegMetadata, out Block8x8F, out Block8x8F)"/>. | ||
/// </summary> | ||
private static JpegColorType? SetFallbackColorType<TPixel>(Image<TPixel> image) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend to rename this to GetFallbackColorType()
, since it doesn't change anything.
JpegMetadata metadata = image.Metadata.GetJpegMetadata(); | ||
if (IsSupportedColorType(metadata.ColorType)) | ||
{ | ||
colorType = metadata.ColorType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: we can return metadata.ColorType
here, so the indentation with colorType is null
becomes unnecessary.
Prerequisites
Description
Fixes #1712