From debe7dd0981007e0072bfdc0878304551f1be9ef Mon Sep 17 00:00:00 2001 From: Rubens Cordeiro Date: Thu, 27 Jun 2024 21:05:20 +0200 Subject: [PATCH] Updated PngChunkFlags enum - Added copyright notice to the header that was previously missing. - Added `#if NETSTANDARD == false` to hide `[Flags]` attribute for non-.NET Standard frameworks. This resolves build failures on Windows ARM64 processors. - Added justification to SuppressMessage in PngChunkFlags "The lowercase names are consistent with the naming conventions of PNG chunk types as defined in the PNG specification." --- src/Magick.NET/Formats/Png/PngChunkFlags.cs | 125 ++++++++++---------- 1 file changed, 64 insertions(+), 61 deletions(-) diff --git a/src/Magick.NET/Formats/Png/PngChunkFlags.cs b/src/Magick.NET/Formats/Png/PngChunkFlags.cs index 6f7fbacfa3..cf4b70557c 100644 --- a/src/Magick.NET/Formats/Png/PngChunkFlags.cs +++ b/src/Magick.NET/Formats/Png/PngChunkFlags.cs @@ -1,78 +1,81 @@ -using System; +// Copyright Dirk Lemstra https://github.com/dlemstra/Magick.NET. +// Licensed under the Apache License, Version 2.0. -namespace ImageMagick.Formats +namespace ImageMagick.Formats; + +#if NETSTANDARD == false + [Flags] +#endif + +/// +/// Specifies the chunks to be included or excluded in the PNG image. +/// This is a flags enumeration, allowing a bitwise combination of its member values. +/// +[System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "The lowercase names are consistent with the naming conventions of PNG chunk types as defined in the PNG specification.")] +public enum PngChunkFlags { /// - /// Specifies the chunks to be included or excluded in the PNG image. - /// This is a flags enumeration, allowing a bitwise combination of its member values. + /// No chunks specified. /// - [Flags] - [System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.NamingRules", "SA1300:Element should begin with upper-case letter", Justification = "")] - public enum PngChunkFlags - { - /// - /// No chunks specified. - /// - None = 0, + None = 0, - /// - /// Include or exclude all chunks. - /// - All = bKGD | cHRM | EXIF | gAMA | iCCP | iTXt | sRGB | tEXt | zCCP | zTXt | date, + /// + /// Include or exclude all chunks. + /// + All = bKGD | cHRM | EXIF | gAMA | iCCP | iTXt | sRGB | tEXt | zCCP | zTXt | date, - /// - /// Include or exclude bKGD chunk. - /// - bKGD = 1 << 0, // 0000 0001 + /// + /// Include or exclude bKGD chunk. + /// + bKGD = 1 << 0, // 0000 0001 - /// - /// Include or exclude cHRM chunk. - /// - cHRM = 1 << 1, // 0000 0010 + /// + /// Include or exclude cHRM chunk. + /// + cHRM = 1 << 1, // 0000 0010 - /// - /// Include or exclude EXIF chunk. - /// - EXIF = 1 << 2, // 0000 0100 + /// + /// Include or exclude EXIF chunk. + /// + EXIF = 1 << 2, // 0000 0100 - /// - /// Include or exclude gAMA chunk. - /// - gAMA = 1 << 3, // 0000 1000 + /// + /// Include or exclude gAMA chunk. + /// + gAMA = 1 << 3, // 0000 1000 - /// - /// Include or exclude iCCP chunk. - /// - iCCP = 1 << 4, // 0001 0000 + /// + /// Include or exclude iCCP chunk. + /// + iCCP = 1 << 4, // 0001 0000 - /// - /// Include or exclude iTXt chunk. - /// - iTXt = 1 << 5, // 0010 0000 + /// + /// Include or exclude iTXt chunk. + /// + iTXt = 1 << 5, // 0010 0000 - /// - /// Include or exclude sRGB chunk. - /// - sRGB = 1 << 6, // 0100 0000 + /// + /// Include or exclude sRGB chunk. + /// + sRGB = 1 << 6, // 0100 0000 - /// - /// Include or exclude tEXt chunk. - /// - tEXt = 1 << 7, // 1000 0000 + /// + /// Include or exclude tEXt chunk. + /// + tEXt = 1 << 7, // 1000 0000 - /// - /// Include or exclude zCCP chunk. - /// - zCCP = 1 << 8, // 1 0000 0000 + /// + /// Include or exclude zCCP chunk. + /// + zCCP = 1 << 8, // 1 0000 0000 - /// - /// Include or exclude zTXt chunk. - /// - zTXt = 1 << 9, // 10 0000 0000 + /// + /// Include or exclude zTXt chunk. + /// + zTXt = 1 << 9, // 10 0000 0000 - /// - /// Include or exclude date chunk. - /// - date = 1 << 10, // 100 0000 0000 - } + /// + /// Include or exclude date chunk. + /// + date = 1 << 10, // 100 0000 0000 }