Add support for decoding Tiff images with UnassociatedAlphaData#2037
Merged
JimBobSquarePants merged 9 commits intomainfrom Mar 8, 2022
Merged
Add support for decoding Tiff images with UnassociatedAlphaData#2037JimBobSquarePants merged 9 commits intomainfrom
JimBobSquarePants merged 9 commits intomainfrom
Conversation
gfoidl
reviewed
Mar 6, 2022
| var color = default(TPixel); | ||
| color.FromVector4(TiffUtils.Vector4Default); | ||
| int offset = 0; | ||
| byte[] buffer = new byte[4]; |
Contributor
There was a problem hiding this comment.
Can this allocation be avoided?
I.e. turn it into stackalloc and use it as Span<byte>. Maybe TiffUtils need to be updated also.
| var color = default(TPixel); | ||
| color.FromVector4(TiffUtils.Vector4Default); | ||
| int offset = 0; | ||
| byte[] buffer = new byte[4]; |
…lanar configuration
| { | ||
| data.Slice(offset, 4).CopyTo(buffer); | ||
| Array.Reverse(buffer); | ||
| float r = BitConverter.ToSingle(buffer, 0); |
Member
There was a problem hiding this comment.
It'll be nice when we can use BinaryPrimitives.ReadSingleBigEndian here.
JimBobSquarePants
approved these changes
Mar 8, 2022
Member
JimBobSquarePants
left a comment
There was a problem hiding this comment.
Really nice job, very neat. Thanks!
4 tasks
Contributor
|
sorry, I'm completely lost |
This was referenced Jul 23, 2025
This was referenced Jul 30, 2025
This was referenced Sep 23, 2025
This was referenced Oct 3, 2025
This was referenced Feb 3, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Prerequisites
Description
This PR adds support for decoding Tiff images with UnassociatedAlphaData. This is the first step in supporting decoding tiff images with
ExtraSamples./cc @IldarKhayrutdinov