Browse Source

Update src/ImageSharp/Formats/Png/PngDecoderCore.cs

Co-authored-by: Günther Foidl <gue@korporal.at>
pull/1861/head
James Jackson-South 5 years ago
committed by GitHub
parent
commit
d7032fe6ee
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/ImageSharp/Formats/Png/PngDecoderCore.cs

2
src/ImageSharp/Formats/Png/PngDecoderCore.cs

@ -374,7 +374,7 @@ namespace SixLabors.ImageSharp.Formats.Png
// The value is encoded as a 4-byte unsigned integer, representing gamma times 100000.
// For example, a gamma of 1/2.2 would be stored as 45455.
=> pngMetadata.Gamma = BinaryPrimitives.ReadUInt32BigEndian(data) / 100_000F;
=> pngMetadata.Gamma = BinaryPrimitives.ReadUInt32BigEndian(data) * 1e-5F;
/// <summary>
/// Initializes the image and various buffers needed for processing

Loading…
Cancel
Save