This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-imaging.git
commit 6de5cb8032bfe195e7a1be03ea5420d8ff85fc5a Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Sun May 14 09:30:28 2023 -0400 Use uppercase for the acronym PNG in text --- .../commons/imaging/formats/png/PngImagingParameters.java | 4 ++-- .../org/apache/commons/imaging/formats/png/PngWriter.java | 12 ++++++------ .../commons/imaging/formats/png/chunks/PngChunkGama.java | 2 +- .../commons/imaging/formats/png/chunks/PngChunkIhdr.java | 14 +++++++------- .../commons/imaging/formats/png/chunks/PngChunkPhys.java | 6 +++--- .../commons/imaging/formats/png/chunks/PngChunkPlte.java | 6 +++--- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/main/java/org/apache/commons/imaging/formats/png/PngImagingParameters.java b/src/main/java/org/apache/commons/imaging/formats/png/PngImagingParameters.java index 97623557..b7f7c534 100644 --- a/src/main/java/org/apache/commons/imaging/formats/png/PngImagingParameters.java +++ b/src/main/java/org/apache/commons/imaging/formats/png/PngImagingParameters.java @@ -21,7 +21,7 @@ import java.util.List; import org.apache.commons.imaging.common.XmpImagingParameters; /** - * Png format parameters. + * PNG format parameters. * @since 1.0-alpha3 */ public class PngImagingParameters extends XmpImagingParameters<PngImagingParameters> { @@ -49,7 +49,7 @@ public class PngImagingParameters extends XmpImagingParameters<PngImagingParamet private PhysicalScale physicalScale; /** - * <p>Only used when writing Png images.</p> + * <p>Only used when writing PNG images.</p> * * <p>Valid values: a list of WriteTexts.</p> */ diff --git a/src/main/java/org/apache/commons/imaging/formats/png/PngWriter.java b/src/main/java/org/apache/commons/imaging/formats/png/PngWriter.java index 400b9266..13949a3b 100644 --- a/src/main/java/org/apache/commons/imaging/formats/png/PngWriter.java +++ b/src/main/java/org/apache/commons/imaging/formats/png/PngWriter.java @@ -137,10 +137,10 @@ class PngWriter { private void writeChunkiTXt(final OutputStream os, final PngText.Itxt text) throws IOException, ImageWriteException { if (!isValidISO_8859_1(text.keyword)) { - throw new ImageWriteException("Png tEXt chunk keyword is not ISO-8859-1: " + text.keyword); + throw new ImageWriteException("PNG tEXt chunk keyword is not ISO-8859-1: " + text.keyword); } if (!isValidISO_8859_1(text.languageTag)) { - throw new ImageWriteException("Png tEXt chunk language tag is not ISO-8859-1: " + text.languageTag); + throw new ImageWriteException("PNG tEXt chunk language tag is not ISO-8859-1: " + text.languageTag); } final ByteArrayOutputStream baos = new ByteArrayOutputStream(); @@ -217,10 +217,10 @@ class PngWriter { private void writeChunktEXt(final OutputStream os, final PngText.Text text) throws IOException, ImageWriteException { if (!isValidISO_8859_1(text.keyword)) { - throw new ImageWriteException("Png tEXt chunk keyword is not ISO-8859-1: " + text.keyword); + throw new ImageWriteException("PNG tEXt chunk keyword is not ISO-8859-1: " + text.keyword); } if (!isValidISO_8859_1(text.text)) { - throw new ImageWriteException("Png tEXt chunk text is not ISO-8859-1: " + text.text); + throw new ImageWriteException("PNG tEXt chunk text is not ISO-8859-1: " + text.text); } final ByteArrayOutputStream baos = new ByteArrayOutputStream(); @@ -271,10 +271,10 @@ class PngWriter { private void writeChunkzTXt(final OutputStream os, final PngText.Ztxt text) throws IOException, ImageWriteException { if (!isValidISO_8859_1(text.keyword)) { - throw new ImageWriteException("Png zTXt chunk keyword is not ISO-8859-1: " + text.keyword); + throw new ImageWriteException("PNG zTXt chunk keyword is not ISO-8859-1: " + text.keyword); } if (!isValidISO_8859_1(text.text)) { - throw new ImageWriteException("Png zTXt chunk text is not ISO-8859-1: " + text.text); + throw new ImageWriteException("PNG zTXt chunk text is not ISO-8859-1: " + text.text); } final ByteArrayOutputStream baos = new ByteArrayOutputStream(); diff --git a/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkGama.java b/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkGama.java index f995d0c0..0fa864c1 100644 --- a/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkGama.java +++ b/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkGama.java @@ -29,7 +29,7 @@ public class PngChunkGama extends PngChunk { super(length, chunkType, crc, bytes); final ByteArrayInputStream is = new ByteArrayInputStream(bytes); - gamma = read4Bytes("Gamma", is, "Not a Valid Png File: gAMA Corrupt", getByteOrder()); + gamma = read4Bytes("Gamma", is, "Not a Valid PNG File: gAMA Corrupt", getByteOrder()); } public double getGamma() { diff --git a/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkIhdr.java b/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkIhdr.java index 614b12d0..98347c31 100644 --- a/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkIhdr.java +++ b/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkIhdr.java @@ -39,17 +39,17 @@ public class PngChunkIhdr extends PngChunk { super(length, chunkType, crc, bytes); final ByteArrayInputStream is = new ByteArrayInputStream(bytes); - width = read4Bytes("Width", is, "Not a Valid Png File: IHDR Corrupt", getByteOrder()); - height = read4Bytes("Height", is, "Not a Valid Png File: IHDR Corrupt", getByteOrder()); - bitDepth = readByte("BitDepth", is, "Not a Valid Png File: IHDR Corrupt"); - final int type = readByte("ColorType", is, "Not a Valid Png File: IHDR Corrupt"); + width = read4Bytes("Width", is, "Not a Valid PNG File: IHDR Corrupt", getByteOrder()); + height = read4Bytes("Height", is, "Not a Valid PNG File: IHDR Corrupt", getByteOrder()); + bitDepth = readByte("BitDepth", is, "Not a Valid PNG File: IHDR Corrupt"); + final int type = readByte("ColorType", is, "Not a Valid PNG File: IHDR Corrupt"); pngColorType = PngColorType.getColorType(type); if (pngColorType == null) { throw new ImageReadException("PNG: unknown color type: " + type); } - compressionMethod = readByte("CompressionMethod", is, "Not a Valid Png File: IHDR Corrupt"); - filterMethod = readByte("FilterMethod", is, "Not a Valid Png File: IHDR Corrupt"); - final int method = readByte("InterlaceMethod", is, "Not a Valid Png File: IHDR Corrupt"); + compressionMethod = readByte("CompressionMethod", is, "Not a Valid PNG File: IHDR Corrupt"); + filterMethod = readByte("FilterMethod", is, "Not a Valid PNG File: IHDR Corrupt"); + final int method = readByte("InterlaceMethod", is, "Not a Valid PNG File: IHDR Corrupt"); if (method < 0 || method >= InterlaceMethod.values().length) { throw new ImageReadException("PNG: unknown interlace method: " + method); } diff --git a/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkPhys.java b/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkPhys.java index 742d9527..31b15be7 100644 --- a/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkPhys.java +++ b/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkPhys.java @@ -32,9 +32,9 @@ public class PngChunkPhys extends PngChunk { final ByteArrayInputStream is = new ByteArrayInputStream(bytes); - pixelsPerUnitXAxis = read4Bytes("PixelsPerUnitXAxis", is, "Not a Valid Png File: pHYs Corrupt", getByteOrder()); - pixelsPerUnitYAxis = read4Bytes("PixelsPerUnitYAxis", is, "Not a Valid Png File: pHYs Corrupt", getByteOrder()); - unitSpecifier = readByte("Unit specifier", is, "Not a Valid Png File: pHYs Corrupt"); + pixelsPerUnitXAxis = read4Bytes("PixelsPerUnitXAxis", is, "Not a Valid PNG File: pHYs Corrupt", getByteOrder()); + pixelsPerUnitYAxis = read4Bytes("PixelsPerUnitYAxis", is, "Not a Valid PNG File: pHYs Corrupt", getByteOrder()); + unitSpecifier = readByte("Unit specifier", is, "Not a Valid PNG File: pHYs Corrupt"); } } diff --git a/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkPlte.java b/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkPlte.java index 4ecdab79..889a933b 100644 --- a/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkPlte.java +++ b/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkPlte.java @@ -45,11 +45,11 @@ public class PngChunkPlte extends PngChunk { for (int i = 0; i < count; i++) { final int red = readByte("red[" + i + "]", is, - "Not a Valid Png File: PLTE Corrupt"); + "Not a Valid PNG File: PLTE Corrupt"); final int green = readByte("green[" + i + "]", is, - "Not a Valid Png File: PLTE Corrupt"); + "Not a Valid PNG File: PLTE Corrupt"); final int blue = readByte("blue[" + i + "]", is, - "Not a Valid Png File: PLTE Corrupt"); + "Not a Valid PNG File: PLTE Corrupt"); rgb[i] = 0xff000000 | ((0xff & red) << 16) | ((0xff & green) << 8) | ((0xff & blue) << 0); }