-
-
Notifications
You must be signed in to change notification settings - Fork 893
Feature: Bitmap RLE undefined pixel handling #927
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 16 commits into
SixLabors:master
from
brianpopow:feature/RleUndefinedPixelHandling
Jun 10, 2019
Merged
Changes from 12 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
f93127b
Add bitmap decoder option, how to treat skipped pixels for RLE
brianpopow 8598a44
Refactored bitmap tests into smaller tests, instead of just one test …
brianpopow d41b1ff
Add another adobe v3 header bitmap testcase
brianpopow 3c1eef2
Using the constant from BmpConstants to Identify bitmaps
brianpopow 26ce2fc
Bitmap decoder now can handle oversized palette's
brianpopow 79703bc
Add test for invalid palette size
brianpopow c3b44e1
Merge branch 'master' into feature/RleUndefinedPixelHandling
brianpopow abbe8e3
Renamed RleUndefinedPixelHandling to RleSkippedPixelHandling
brianpopow bd24596
Explicitly using SystemDrawingReferenceDecoder in some BitmapDecoder …
brianpopow 22be7ea
Add test cases for unsupported bitmaps
brianpopow 21dfbc0
Comparing RLE test images to reference decoder only on windows
brianpopow 42676f8
Add test case for decoding winv4 fast path
brianpopow a91e6d8
Add another 8 Bit RLE test with magick reference decoder
brianpopow 3d35066
Optimize RLE skipped pixel handling
brianpopow b070ce3
Refactor RLE decoding to eliminate code duplication
brianpopow d79fe53
Using MagickReferenceDecoder for the 8-Bit RLE test
brianpopow 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
Large diffs are not rendered by default.
Oops, something went wrong.
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,26 @@ | ||
| // Copyright (c) Six Labors and contributors. | ||
| // Licensed under the Apache License, Version 2.0. | ||
|
|
||
| namespace SixLabors.ImageSharp.Formats.Bmp | ||
| { | ||
| /// <summary> | ||
| /// Defines possible options, how skipped pixels during decoding of run length encoded bitmaps should be treated. | ||
| /// </summary> | ||
| public enum RleSkippedPixelHandling : int | ||
| { | ||
| /// <summary> | ||
| /// Undefined pixels should be black. This is how System.Drawing handles undefined pixels. | ||
| /// </summary> | ||
| Black = 0, | ||
|
|
||
| /// <summary> | ||
| /// Undefined pixels should be transparent. | ||
| /// </summary> | ||
| Transparent = 1, | ||
|
|
||
| /// <summary> | ||
| /// Undefined pixels should have the first color of the palette. | ||
| /// </summary> | ||
| FirstColorOfPalette = 2 | ||
| } | ||
| } |
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.