-
-
Notifications
You must be signed in to change notification settings - Fork 888
Add support for decoding Tiff images with UnassociatedAlphaData #2037
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
Conversation
| var color = default(TPixel); | ||
| color.FromVector4(TiffUtils.Vector4Default); | ||
| int offset = 0; | ||
| byte[] buffer = new byte[4]; |
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.
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]; |
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.
Same here.
…lanar configuration
| { | ||
| data.Slice(offset, 4).CopyTo(buffer); | ||
| Array.Reverse(buffer); | ||
| float r = BitConverter.ToSingle(buffer, 0); |
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.
It'll be nice when we can use BinaryPrimitives.ReadSingleBigEndian here.
JimBobSquarePants
left a comment
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.
Really nice job, very neat. Thanks!
|
sorry, I'm completely lost |
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