mirror of https://github.com/SixLabors/ImageSharp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
898 B
31 lines
898 B
// Copyright (c) Six Labors and contributors.
|
|
// Licensed under the Apache License, Version 2.0.
|
|
|
|
using SixLabors.ImageSharp.Formats.Png;
|
|
using Xunit;
|
|
|
|
namespace SixLabors.ImageSharp.Tests.Formats.Png
|
|
{
|
|
public class PngMetaDataTests
|
|
{
|
|
[Fact]
|
|
public void CloneIsDeep()
|
|
{
|
|
var meta = new PngMetadata()
|
|
{
|
|
BitDepth = PngBitDepth.Bit16,
|
|
ColorType = PngColorType.GrayscaleWithAlpha,
|
|
Gamma = 2
|
|
};
|
|
var clone = (PngMetadata)meta.DeepClone();
|
|
|
|
clone.BitDepth = PngBitDepth.Bit2;
|
|
clone.ColorType = PngColorType.Palette;
|
|
clone.Gamma = 1;
|
|
|
|
Assert.False(meta.BitDepth.Equals(clone.BitDepth));
|
|
Assert.False(meta.ColorType.Equals(clone.ColorType));
|
|
Assert.False(meta.Gamma.Equals(clone.Gamma));
|
|
}
|
|
}
|
|
}
|