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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
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.
|
|
|
// 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.
|
|
|
// 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>
|
|
|
/// <summary>
|
|
|
/// Initializes the image and various buffers needed for processing
|
|
|
/// Initializes the image and various buffers needed for processing
|
|
|
|