Browse Source
Update src/ImageSharp/Formats/Png/PngMetadata.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
pull/2975/head
James Jackson-South
6 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
1 deletions
-
src/ImageSharp/Formats/Png/PngMetadata.cs
|
|
|
@ -234,7 +234,7 @@ public class PngMetadata : IFormatMetadata<PngMetadata> |
|
|
|
this.ColorTable = null; |
|
|
|
|
|
|
|
// If the color type is RGB and we have a transparent color, we need to switch to RGBA
|
|
|
|
// so that we do not incorrectly preserve the obsolete tRNS chunk.
|
|
|
|
// so that we do not incorrectly preserve the obsolete tRNS chunk.
|
|
|
|
if (this.ColorType == PngColorType.Rgb && this.TransparentColor.HasValue) |
|
|
|
{ |
|
|
|
this.ColorType = PngColorType.RgbWithAlpha; |
|
|
|
|