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 159e285adc4b6c909b5976e5260e4ac56ae51555 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Mon Nov 13 13:59:12 2023 -0500 Don't need instances --- .../commons/imaging/formats/tiff/datareaders/DataInterpreterJpeg.java | 2 +- .../commons/imaging/formats/tiff/datareaders/DataReaderStrips.java | 3 +-- .../commons/imaging/formats/tiff/datareaders/DataReaderTiled.java | 4 +--- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataInterpreterJpeg.java b/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataInterpreterJpeg.java index 632f4d79..b361fcc1 100644 --- a/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataInterpreterJpeg.java +++ b/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataInterpreterJpeg.java @@ -65,7 +65,7 @@ final class DataInterpreterJpeg { * JPEG-specific encoding error * @throws IOException in the event of an unrecoverable I/O error */ - void intepretBlock(final TiffDirectory directory, + static void intepretBlock(final TiffDirectory directory, final ImageBuilder workingBuilder, final int xBlock, final int yBlock, diff --git a/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderStrips.java b/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderStrips.java index 07e30ac4..3b1a5cd7 100644 --- a/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderStrips.java +++ b/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderStrips.java @@ -308,10 +308,9 @@ public final class DataReaderStrips extends ImageDataReader { final byte[] compressed = imageData.getImageData(strip).getData(); if (compression == TIFF_COMPRESSION_JPEG) { - DataInterpreterJpeg dij = new DataInterpreterJpeg(); int yBlock = strip*rowsPerStrip; int yWork = yBlock-y0; - dij.intepretBlock(directory, workingBuilder, + DataInterpreterJpeg.intepretBlock(directory, workingBuilder, 0, yWork, width, (int)rowsInThisStrip, compressed); continue; } diff --git a/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderTiled.java b/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderTiled.java index 08d507c2..7378a4a5 100644 --- a/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderTiled.java +++ b/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderTiled.java @@ -274,9 +274,7 @@ public final class DataReaderTiled extends ImageDataReader { throw new ImagingException( "TIFF file in non-supported configuration: JPEG compression used in planar configuration."); } - DataInterpreterJpeg dij = new DataInterpreterJpeg(); - - dij.intepretBlock(directory, workingBuilder, + DataInterpreterJpeg.intepretBlock(directory, workingBuilder, x, y, tileWidth, (int) tileLength, compressed); continue; }