-
-
Notifications
You must be signed in to change notification settings - Fork 888
Added: ability to skip unneeded chunks for optimization mode #1012
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
Merged
JimBobSquarePants
merged 27 commits into
SixLabors:master
from
equinox2k:PNGOptimisation
May 17, 2020
Merged
Changes from 3 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
9d62a2c
Added: ability to skip unneeded chunks for optimization mode
equinox2k 69f01c3
Update: forgot to implement Optimized property
equinox2k 9ee2066
Added: test + fixed optimized property
equinox2k 8d9fbb7
Fixed property documentation + Optimized transparency
equinox2k 81bc719
Update: expanded optimize options
equinox2k fc8f5e3
Update: transparent pixels to black before quantization
equinox2k ba08c64
Fixed tests
equinox2k f8c5277
Fixed transparency update
equinox2k 6e3e4ce
Fixed formatting
equinox2k 6259881
Merge branch 'master' into PNGOptimisation
equinox2k d68d7bd
Merge remote-tracking branch 'upstream/master' into PNGOptimisation
brianpopow 6765f96
Renamed enum to PngChunkFilter and also renamed enum names
brianpopow f257ef2
Add tests for exclude filter
brianpopow f04e836
MakeTransparentBlack is now a png encoder option
brianpopow 624591c
Refactor
brianpopow a86713f
Add tests for make transparent black option
brianpopow 8ca9b97
MakeTransparentBlack option now work with all png color type
brianpopow c386f9d
Merge branch 'master' into PNGOptimisation
brianpopow 200ef9f
ExcludeAll = ~None
brianpopow f9c2f6a
Improve exclude filter test to also check presence of expected chunks
brianpopow 0f581ab
Remove not needed image parameter from CalculateBitDepth
brianpopow bc7eb27
Add IgnoreMetadata to the png encoder options
brianpopow ec3656f
Add PngTransparentColorBehavior enum
brianpopow 749f68a
Merge branch 'master' into PNGOptimisation
brianpopow 129b639
Switched Preserve to be 0 for PngTransparentColorBehavior enum
brianpopow b69d772
Rename PngTransparentColorBehavior to PngTransparentColorMode
brianpopow b817615
Merge branch 'master' into PNGOptimisation
JimBobSquarePants File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| // Copyright (c) Six Labors and contributors. | ||
| // Licensed under the GNU Affero General Public License, Version 3. | ||
|
|
||
| namespace SixLabors.ImageSharp.Formats.Png | ||
| { | ||
| /// <summary> | ||
| /// Enum indicating how the transparency should be handled on encoding. | ||
| /// </summary> | ||
| public enum PngTransparentColorBehavior | ||
| { | ||
| /// <summary> | ||
| /// Converts fully transparent pixels that may contain R, G, B values which are not 0, | ||
| /// to transparent black, which can yield in better compression in some cases. | ||
| /// </summary> | ||
| Clear, | ||
|
|
||
| /// <summary> | ||
| /// The transparency will be kept as is. | ||
| /// </summary> | ||
| Preserve | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
My bad, let's call it
PngTransparentColorModeto keep it in line with othernaming.