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 0348fbaa6ba2b4b200f4e50f2b880446a55a7e39 Author: Gary Gregory <[email protected]> AuthorDate: Sun May 14 09:28:43 2023 -0400 Use uppercase for the acronym JPEG --- .../imaging/formats/jpeg/JpegImageParser.java | 4 +- .../formats/jpeg/JpegImagingParameters.java | 2 +- .../imaging/formats/jpeg/exif/ExifRewriter.java | 50 +++++++++++----------- .../formats/jpeg/iptc/JpegIptcRewriter.java | 42 +++++++++--------- .../imaging/formats/jpeg/xmp/JpegRewriter.java | 2 +- .../imaging/formats/jpeg/xmp/JpegXmpRewriter.java | 28 ++++++------ .../imaging/formats/tiff/JpegImageData.java | 2 +- .../imaging/formats/tiff/JpegImageDataTest.java | 2 +- 8 files changed, 66 insertions(+), 66 deletions(-) diff --git a/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegImageParser.java b/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegImageParser.java index 4dad4ba4..c6cc3c94 100644 --- a/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegImageParser.java +++ b/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegImageParser.java @@ -725,7 +725,7 @@ public class JpegImageParser extends ImageParser<JpegImagingParameters> implemen final PhotoshopApp13Data data = segment.parsePhotoshopSegment(params); if (data != null) { if (photoshopApp13Data != null) { - throw new ImageReadException("Jpeg contains more than one Photoshop App13 segment."); + throw new ImageReadException("JPEG contains more than one Photoshop App13 segment."); } photoshopApp13Data = data; } @@ -792,7 +792,7 @@ public class JpegImageParser extends ImageParser<JpegImagingParameters> implemen } if (result.size() > 1) { throw new ImageReadException( - "Jpeg file contains more than one XMP segment."); + "JPEG file contains more than one XMP segment."); } return result.get(0); } diff --git a/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegImagingParameters.java b/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegImagingParameters.java index 34754245..a290b2fa 100644 --- a/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegImagingParameters.java +++ b/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegImagingParameters.java @@ -18,7 +18,7 @@ package org.apache.commons.imaging.formats.jpeg; import org.apache.commons.imaging.common.XmpImagingParameters; /** - * Jpeg format parameters. + * JPEG format parameters. * * @since 1.0-alpha3 */ diff --git a/src/main/java/org/apache/commons/imaging/formats/jpeg/exif/ExifRewriter.java b/src/main/java/org/apache/commons/imaging/formats/jpeg/exif/ExifRewriter.java index 198512d0..ee76448d 100644 --- a/src/main/java/org/apache/commons/imaging/formats/jpeg/exif/ExifRewriter.java +++ b/src/main/java/org/apache/commons/imaging/formats/jpeg/exif/ExifRewriter.java @@ -199,11 +199,11 @@ public class ExifRewriter extends BinaryFileParser { } /** - * Reads a Jpeg image, removes all EXIF metadata (by removing the APP1 + * Reads a JPEG image, removes all EXIF metadata (by removing the APP1 * segment), and writes the result to a stream. * * @param src - * Byte array containing Jpeg image data. + * Byte array containing JPEG image data. * @param os * OutputStream to write the image to. * @throws ImageReadException if it fails to read the JFIF segments @@ -217,11 +217,11 @@ public class ExifRewriter extends BinaryFileParser { } /** - * Reads a Jpeg image, removes all EXIF metadata (by removing the APP1 + * Reads a JPEG image, removes all EXIF metadata (by removing the APP1 * segment), and writes the result to a stream. * * @param byteSource - * ByteSource containing Jpeg image data. + * ByteSource containing JPEG image data. * @param os * OutputStream to write the image to. * @throws ImageReadException if it fails to read the JFIF segments @@ -243,7 +243,7 @@ public class ExifRewriter extends BinaryFileParser { } /** - * Reads a Jpeg image, removes all EXIF metadata (by removing the APP1 + * Reads a JPEG image, removes all EXIF metadata (by removing the APP1 * segment), and writes the result to a stream. * <p> * @@ -267,11 +267,11 @@ public class ExifRewriter extends BinaryFileParser { } /** - * Reads a Jpeg image, removes all EXIF metadata (by removing the APP1 + * Reads a JPEG image, removes all EXIF metadata (by removing the APP1 * segment), and writes the result to a stream. * * @param src - * InputStream containing Jpeg image data. + * InputStream containing JPEG image data. * @param os * OutputStream to write the image to. * @throws ImageReadException if it fails to read the JFIF segments @@ -285,7 +285,7 @@ public class ExifRewriter extends BinaryFileParser { } /** - * Reads a Jpeg image, replaces the EXIF metadata and writes the result to a + * Reads a JPEG image, replaces the EXIF metadata and writes the result to a * stream. * * <p>Note that this uses the "Lossless" approach - in order to preserve data @@ -293,10 +293,10 @@ public class ExifRewriter extends BinaryFileParser { * this algorithm avoids overwriting any part of the original segment that * it couldn't parse. This can cause the EXIF segment to grow with each * update, which is a serious issue, since all EXIF data must fit in a - * single APP1 segment of the Jpeg image.</p> + * single APP1 segment of the JPEG image.</p> * * @param src - * Byte array containing Jpeg image data. + * Byte array containing JPEG image data. * @param os * OutputStream to write the image to. * @param outputSet @@ -313,7 +313,7 @@ public class ExifRewriter extends BinaryFileParser { } /** - * Reads a Jpeg image, replaces the EXIF metadata and writes the result to a + * Reads a JPEG image, replaces the EXIF metadata and writes the result to a * stream. * * <p>Note that this uses the "Lossless" approach - in order to preserve data @@ -321,10 +321,10 @@ public class ExifRewriter extends BinaryFileParser { * this algorithm avoids overwriting any part of the original segment that * it couldn't parse. This can cause the EXIF segment to grow with each * update, which is a serious issue, since all EXIF data must fit in a - * single APP1 segment of the Jpeg image.</p> + * single APP1 segment of the JPEG image.</p> * * @param byteSource - * ByteSource containing Jpeg image data. + * ByteSource containing JPEG image data. * @param os * OutputStream to write the image to. * @param outputSet @@ -362,7 +362,7 @@ public class ExifRewriter extends BinaryFileParser { } /** - * Reads a Jpeg image, replaces the EXIF metadata and writes the result to a + * Reads a JPEG image, replaces the EXIF metadata and writes the result to a * stream. * * <p>Note that this uses the "Lossless" approach - in order to preserve data @@ -370,7 +370,7 @@ public class ExifRewriter extends BinaryFileParser { * this algorithm avoids overwriting any part of the original segment that * it couldn't parse. This can cause the EXIF segment to grow with each * update, which is a serious issue, since all EXIF data must fit in a - * single APP1 segment of the Jpeg image.</p> + * single APP1 segment of the JPEG image.</p> * * @param src * Image file. @@ -390,7 +390,7 @@ public class ExifRewriter extends BinaryFileParser { } /** - * Reads a Jpeg image, replaces the EXIF metadata and writes the result to a + * Reads a JPEG image, replaces the EXIF metadata and writes the result to a * stream. * * <p>Note that this uses the "Lossless" approach - in order to preserve data @@ -398,10 +398,10 @@ public class ExifRewriter extends BinaryFileParser { * this algorithm avoids overwriting any part of the original segment that * it couldn't parse. This can cause the EXIF segment to grow with each * update, which is a serious issue, since all EXIF data must fit in a - * single APP1 segment of the Jpeg image.</p> + * single APP1 segment of the JPEG image.</p> * * @param src - * InputStream containing Jpeg image data. + * InputStream containing JPEG image data. * @param os * OutputStream to write the image to. * @param outputSet @@ -418,7 +418,7 @@ public class ExifRewriter extends BinaryFileParser { } /** - * Reads a Jpeg image, replaces the EXIF metadata and writes the result to a + * Reads a JPEG image, replaces the EXIF metadata and writes the result to a * stream. * * <p>Note that this uses the "Lossy" approach - the algorithm overwrites the @@ -426,7 +426,7 @@ public class ExifRewriter extends BinaryFileParser { * data it couldn't parse (such as Maker Notes).</p> * * @param src - * Byte array containing Jpeg image data. + * Byte array containing JPEG image data. * @param os * OutputStream to write the image to. * @param outputSet @@ -443,7 +443,7 @@ public class ExifRewriter extends BinaryFileParser { } /** - * Reads a Jpeg image, replaces the EXIF metadata and writes the result to a + * Reads a JPEG image, replaces the EXIF metadata and writes the result to a * stream. * * <p>Note that this uses the "Lossy" approach - the algorithm overwrites the @@ -451,7 +451,7 @@ public class ExifRewriter extends BinaryFileParser { * data it couldn't parse (such as Maker Notes).</p> * * @param byteSource - * ByteSource containing Jpeg image data. + * ByteSource containing JPEG image data. * @param os * OutputStream to write the image to. * @param outputSet @@ -476,7 +476,7 @@ public class ExifRewriter extends BinaryFileParser { } /** - * Reads a Jpeg image, replaces the EXIF metadata and writes the result to a + * Reads a JPEG image, replaces the EXIF metadata and writes the result to a * stream. * * <p>Note that this uses the "Lossy" approach - the algorithm overwrites the @@ -501,7 +501,7 @@ public class ExifRewriter extends BinaryFileParser { } /** - * Reads a Jpeg image, replaces the EXIF metadata and writes the result to a + * Reads a JPEG image, replaces the EXIF metadata and writes the result to a * stream. * * <p>Note that this uses the "Lossy" approach - the algorithm overwrites the @@ -509,7 +509,7 @@ public class ExifRewriter extends BinaryFileParser { * data it couldn't parse (such as Maker Notes).</p> * * @param src - * InputStream containing Jpeg image data. + * InputStream containing JPEG image data. * @param os * OutputStream to write the image to. * @param outputSet diff --git a/src/main/java/org/apache/commons/imaging/formats/jpeg/iptc/JpegIptcRewriter.java b/src/main/java/org/apache/commons/imaging/formats/jpeg/iptc/JpegIptcRewriter.java index c568039e..11a68834 100644 --- a/src/main/java/org/apache/commons/imaging/formats/jpeg/iptc/JpegIptcRewriter.java +++ b/src/main/java/org/apache/commons/imaging/formats/jpeg/iptc/JpegIptcRewriter.java @@ -41,13 +41,13 @@ import org.apache.commons.imaging.formats.jpeg.xmp.JpegRewriter; public class JpegIptcRewriter extends JpegRewriter { /** - * Reads a Jpeg image, removes all IPTC data from the App13 segment but + * Reads a JPEG image, removes all IPTC data from the App13 segment but * leaves the other data in that segment (if present) unchanged and writes * the result to a stream. * <p> * * @param src - * Byte array containing Jpeg image data. + * Byte array containing JPEG image data. * @param os * OutputStream to write the image to. * @throws ImageReadException if there are more than one Photoshop App13 segment, or if @@ -62,13 +62,13 @@ public class JpegIptcRewriter extends JpegRewriter { } /** - * Reads a Jpeg image, removes all IPTC data from the App13 segment but + * Reads a JPEG image, removes all IPTC data from the App13 segment but * leaves the other data in that segment (if present) unchanged (unless * removeSegment is true) and writes the result to a stream. * <p> * * @param src - * Byte array containing Jpeg image data. + * Byte array containing JPEG image data. * @param os * OutputStream to write the image to. * @param removeSegment @@ -86,13 +86,13 @@ public class JpegIptcRewriter extends JpegRewriter { } /** - * Reads a Jpeg image, removes all IPTC data from the App13 segment but + * Reads a JPEG image, removes all IPTC data from the App13 segment but * leaves the other data in that segment (if present) unchanged and writes * the result to a stream. * <p> * * @param byteSource - * ByteSource containing Jpeg image data. + * ByteSource containing JPEG image data. * @param os * OutputStream to write the image to. * @throws ImageReadException if there are more than one Photoshop App13 segment, or if @@ -107,13 +107,13 @@ public class JpegIptcRewriter extends JpegRewriter { } /** - * Reads a Jpeg image, removes all IPTC data from the App13 segment but + * Reads a JPEG image, removes all IPTC data from the App13 segment but * leaves the other data in that segment (if present) unchanged (unless * removeSegment is true) and writes the result to a stream. * <p> * * @param byteSource - * ByteSource containing Jpeg image data. + * ByteSource containing JPEG image data. * @param os * OutputStream to write the image to. * @param removeSegment @@ -152,7 +152,7 @@ public class JpegIptcRewriter extends JpegRewriter { } /** - * Reads a Jpeg image, removes all IPTC data from the App13 segment but + * Reads a JPEG image, removes all IPTC data from the App13 segment but * leaves the other data in that segment (if present) unchanged and writes * the result to a stream. * <p> @@ -176,7 +176,7 @@ public class JpegIptcRewriter extends JpegRewriter { } /** - * Reads a Jpeg image, removes all IPTC data from the App13 segment but + * Reads a JPEG image, removes all IPTC data from the App13 segment but * leaves the other data in that segment (if present) unchanged (unless * removeSegment is true) and writes the result to a stream. * <p> @@ -203,13 +203,13 @@ public class JpegIptcRewriter extends JpegRewriter { } /** - * Reads a Jpeg image, removes all IPTC data from the App13 segment but + * Reads a JPEG image, removes all IPTC data from the App13 segment but * leaves the other data in that segment (if present) unchanged and writes * the result to a stream. * <p> * * @param src - * InputStream containing Jpeg image data. + * InputStream containing JPEG image data. * @param os * OutputStream to write the image to. * @throws ImageReadException if there are more than one Photoshop App13 segment, or if @@ -224,13 +224,13 @@ public class JpegIptcRewriter extends JpegRewriter { } /** - * Reads a Jpeg image, removes all IPTC data from the App13 segment but + * Reads a JPEG image, removes all IPTC data from the App13 segment but * leaves the other data in that segment (if present) unchanged (unless * removeSegment is true) and writes the result to a stream. * <p> * * @param src - * InputStream containing Jpeg image data. + * InputStream containing JPEG image data. * @param os * OutputStream to write the image to. * @param removeSegment @@ -248,12 +248,12 @@ public class JpegIptcRewriter extends JpegRewriter { } /** - * Reads a Jpeg image, replaces the IPTC data in the App13 segment but + * Reads a JPEG image, replaces the IPTC data in the App13 segment but * leaves the other data in that segment (if present) unchanged and writes * the result to a stream. * * @param src - * Byte array containing Jpeg image data. + * Byte array containing JPEG image data. * @param os * OutputStream to write the image to. * @param newData @@ -272,12 +272,12 @@ public class JpegIptcRewriter extends JpegRewriter { } /** - * Reads a Jpeg image, replaces the IPTC data in the App13 segment but + * Reads a JPEG image, replaces the IPTC data in the App13 segment but * leaves the other data in that segment (if present) unchanged and writes * the result to a stream. * * @param byteSource - * ByteSource containing Jpeg image data. + * ByteSource containing JPEG image data. * @param os * OutputStream to write the image to. * @param newData @@ -323,7 +323,7 @@ public class JpegIptcRewriter extends JpegRewriter { } /** - * Reads a Jpeg image, replaces the IPTC data in the App13 segment but + * Reads a JPEG image, replaces the IPTC data in the App13 segment but * leaves the other data in that segment (if present) unchanged and writes * the result to a stream. * @@ -346,12 +346,12 @@ public class JpegIptcRewriter extends JpegRewriter { } /** - * Reads a Jpeg image, replaces the IPTC data in the App13 segment but + * Reads a JPEG image, replaces the IPTC data in the App13 segment but * leaves the other data in that segment (if present) unchanged and writes * the result to a stream. * * @param src - * InputStream containing Jpeg image data. + * InputStream containing JPEG image data. * @param os * OutputStream to write the image to. * @param newData diff --git a/src/main/java/org/apache/commons/imaging/formats/jpeg/xmp/JpegRewriter.java b/src/main/java/org/apache/commons/imaging/formats/jpeg/xmp/JpegRewriter.java index 3e54629d..afc4df1c 100644 --- a/src/main/java/org/apache/commons/imaging/formats/jpeg/xmp/JpegRewriter.java +++ b/src/main/java/org/apache/commons/imaging/formats/jpeg/xmp/JpegRewriter.java @@ -312,7 +312,7 @@ public class JpegRewriter extends BinaryFileParser { // byte markerBytes[] = convertShortToByteArray(JPEG_APP1_MARKER, // JPEG_BYTE_ORDER); // if (piece.segmentData.length > 0xffff) - // throw new JpegSegmentOverflowException("Jpeg segment is too long: " + // throw new JpegSegmentOverflowException("JPEG segment is too long: " // + piece.segmentData.length); // int segmentLength = piece.segmentData.length + 2; // byte segmentLengthBytes[] = convertShortToByteArray(segmentLength, diff --git a/src/main/java/org/apache/commons/imaging/formats/jpeg/xmp/JpegXmpRewriter.java b/src/main/java/org/apache/commons/imaging/formats/jpeg/xmp/JpegXmpRewriter.java index a5938853..7679fdd2 100644 --- a/src/main/java/org/apache/commons/imaging/formats/jpeg/xmp/JpegXmpRewriter.java +++ b/src/main/java/org/apache/commons/imaging/formats/jpeg/xmp/JpegXmpRewriter.java @@ -39,12 +39,12 @@ import org.apache.commons.imaging.formats.jpeg.JpegConstants; public class JpegXmpRewriter extends JpegRewriter { /** - * Reads a Jpeg image, removes all XMP XML (by removing the APP1 segment), + * Reads a JPEG image, removes all XMP XML (by removing the APP1 segment), * and writes the result to a stream. * <p> * * @param src - * Byte array containing Jpeg image data. + * Byte array containing JPEG image data. * @param os * OutputStream to write the image to. * @throws ImageReadException if it fails to read the JFIF segments @@ -57,12 +57,12 @@ public class JpegXmpRewriter extends JpegRewriter { } /** - * Reads a Jpeg image, removes all XMP XML (by removing the APP1 segment), + * Reads a JPEG image, removes all XMP XML (by removing the APP1 segment), * and writes the result to a stream. * <p> * * @param byteSource - * ByteSource containing Jpeg image data. + * ByteSource containing JPEG image data. * @param os * OutputStream to write the image to. * @throws ImageReadException if it fails to read the JFIF segments @@ -77,7 +77,7 @@ public class JpegXmpRewriter extends JpegRewriter { } /** - * Reads a Jpeg image, removes all XMP XML (by removing the APP1 segment), + * Reads a JPEG image, removes all XMP XML (by removing the APP1 segment), * and writes the result to a stream. * <p> * @@ -98,12 +98,12 @@ public class JpegXmpRewriter extends JpegRewriter { } /** - * Reads a Jpeg image, removes all XMP XML (by removing the APP1 segment), + * Reads a JPEG image, removes all XMP XML (by removing the APP1 segment), * and writes the result to a stream. * <p> * * @param src - * InputStream containing Jpeg image data. + * InputStream containing JPEG image data. * @param os * OutputStream to write the image to. * @throws ImageReadException if it fails to read the JFIF segments @@ -116,11 +116,11 @@ public class JpegXmpRewriter extends JpegRewriter { } /** - * Reads a Jpeg image, replaces the XMP XML and writes the result to a + * Reads a JPEG image, replaces the XMP XML and writes the result to a * stream. * * @param src - * Byte array containing Jpeg image data. + * Byte array containing JPEG image data. * @param os * OutputStream to write the image to. * @param xmpXml @@ -136,11 +136,11 @@ public class JpegXmpRewriter extends JpegRewriter { } /** - * Reads a Jpeg image, replaces the XMP XML and writes the result to a + * Reads a JPEG image, replaces the XMP XML and writes the result to a * stream. * * @param byteSource - * ByteSource containing Jpeg image data. + * ByteSource containing JPEG image data. * @param os * OutputStream to write the image to. * @param xmpXml @@ -173,7 +173,7 @@ public class JpegXmpRewriter extends JpegRewriter { } /** - * Reads a Jpeg image, replaces the XMP XML and writes the result to a + * Reads a JPEG image, replaces the XMP XML and writes the result to a * stream. * * @param src @@ -193,11 +193,11 @@ public class JpegXmpRewriter extends JpegRewriter { } /** - * Reads a Jpeg image, replaces the XMP XML and writes the result to a + * Reads a JPEG image, replaces the XMP XML and writes the result to a * stream. * * @param src - * InputStream containing Jpeg image data. + * InputStream containing JPEG image data. * @param os * OutputStream to write the image to. * @param xmpXml diff --git a/src/main/java/org/apache/commons/imaging/formats/tiff/JpegImageData.java b/src/main/java/org/apache/commons/imaging/formats/tiff/JpegImageData.java index 976b8e12..bf0a9933 100644 --- a/src/main/java/org/apache/commons/imaging/formats/tiff/JpegImageData.java +++ b/src/main/java/org/apache/commons/imaging/formats/tiff/JpegImageData.java @@ -24,7 +24,7 @@ public class JpegImageData extends TiffElement.DataElement { @Override public String getElementDescription() { - return "Jpeg image data: " + getDataLength() + " bytes"; + return "JPEG image data: " + getDataLength() + " bytes"; } } diff --git a/src/test/java/org/apache/commons/imaging/formats/tiff/JpegImageDataTest.java b/src/test/java/org/apache/commons/imaging/formats/tiff/JpegImageDataTest.java index ec0a8dbe..8b664c4f 100644 --- a/src/test/java/org/apache/commons/imaging/formats/tiff/JpegImageDataTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/tiff/JpegImageDataTest.java @@ -28,7 +28,7 @@ public class JpegImageDataTest{ final JpegImageData jpegImageData = new JpegImageData((-1L), 1, byteArray); final String string = jpegImageData.getElementDescription(); - assertEquals("Jpeg image data: 5 bytes", string); + assertEquals("JPEG image data: 5 bytes", string); } } \ No newline at end of file
