Browse Source

Switched Preserve to be 0 for PngTransparentColorBehavior enum

pull/1012/head
Brian Popow 6 years ago
parent
commit
129b6392d5
  1. 2
      src/ImageSharp/Formats/Png/PngChunkFilter.cs
  2. 10
      src/ImageSharp/Formats/Png/PngTransparentColorBehavior.cs
  3. 2
      tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.Chunks.cs

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

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// Licensed under the GNU Affero General Public License, Version 3.
using System;

10
src/ImageSharp/Formats/Png/PngTransparentColorBehavior.cs

@ -9,14 +9,14 @@ namespace SixLabors.ImageSharp.Formats.Png
public enum PngTransparentColorBehavior
{
/// <summary>
/// Converts fully transparent pixels that may contain R, G, B values which are not 0,
/// to transparent black, which can yield in better compression in some cases.
/// The transparency will be kept as is.
/// </summary>
Clear,
Preserve = 0,
/// <summary>
/// The transparency will be kept as is.
/// Converts fully transparent pixels that may contain R, G, B values which are not 0,
/// to transparent black, which can yield in better compression in some cases.
/// </summary>
Preserve
Clear = 1,
}
}

2
tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.Chunks.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
// Licensed under the GNU Affero General Public License, Version 3.
using System;
using System.Buffers.Binary;

Loading…
Cancel
Save