Browse Source

Remove unnecessary ColorScaleTo32Bit when decoding pixel type uint32

pull/3096/head
Brian Popow 1 month ago
parent
commit
b4cd27f2c9
  1. 3
      src/ImageSharp/Formats/Exr/ExrDecoderCore.cs
  2. 3
      tests/Images/Input/Exr/Calliphora_uint32_uncompressed.exr

3
src/ImageSharp/Formats/Exr/ExrDecoderCore.cs

@ -226,7 +226,8 @@ internal sealed class ExrDecoderCore : ImageDecoderCore
for (int x = 0; x < width; x++)
{
pixelRow[x] = ColorScaleTo32Bit<TPixel>(redPixelData[x], greenPixelData[x], bluePixelData[x], hasAlpha ? alphaPixelData[x] : uint.MaxValue);
Rgb96 pixelValue = new(redPixelData[x], greenPixelData[x], bluePixelData[x]);
pixelRow[x] = TPixel.FromVector4(pixelValue.ToVector4());
}
decodedRows++;

3
tests/Images/Input/Exr/Calliphora_uint32_uncompressed.exr

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bed68d2e491cad0bdd0fa668ce57328951927d722f130ba7c5c5475f6a3e0d96
size 289183
Loading…
Cancel
Save