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 90dcacfa80d73f17f3aaa43a842d163b98262308
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Sat Dec 23 11:39:48 2023 -0500

    Sort members
---
 .../commons/imaging/formats/png/PngWriterTest.java | 34 +++++++++++-----------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git 
a/src/test/java/org/apache/commons/imaging/formats/png/PngWriterTest.java 
b/src/test/java/org/apache/commons/imaging/formats/png/PngWriterTest.java
index dec62c57..3497c7a1 100644
--- a/src/test/java/org/apache/commons/imaging/formats/png/PngWriterTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/png/PngWriterTest.java
@@ -36,23 +36,6 @@ import org.junit.jupiter.api.Test;
  */
 public class PngWriterTest extends AbstractPngTest {
 
-    private static int countColors(final byte[] bytes) throws IOException {
-        final BufferedImage imageParsed = Imaging.getBufferedImage(bytes);
-        return new PaletteFactory().makeExactRgbPaletteSimple(imageParsed, 
Integer.MAX_VALUE).length();
-    }
-
-    private static byte[] getImageBytes(final BufferedImage image, final 
PngImagingParameters params, final PaletteFactory paletteFactory) throws 
IOException {
-        try (ByteArrayOutputStream os = new ByteArrayOutputStream()) {
-            new PngWriter().writeImage(image, os, params, paletteFactory);
-            return os.toByteArray();
-        }
-    }
-
-    private File getPngFile(String name) {
-        final File pngFolder = new 
File(ImagingTestConstants.TEST_IMAGE_FOLDER, "png");
-        return new File(pngFolder, name);
-    }
-
     // The form of the test set is
     //    0.   target file name
     //    1.   Expected colour count (as String) - for testPaletteFactory
@@ -70,6 +53,23 @@ public class PngWriterTest extends AbstractPngTest {
         {"5/trns-rgb.png", "26"},
     };
 
+    private static int countColors(final byte[] bytes) throws IOException {
+        final BufferedImage imageParsed = Imaging.getBufferedImage(bytes);
+        return new PaletteFactory().makeExactRgbPaletteSimple(imageParsed, 
Integer.MAX_VALUE).length();
+    }
+
+    private static byte[] getImageBytes(final BufferedImage image, final 
PngImagingParameters params, final PaletteFactory paletteFactory) throws 
IOException {
+        try (ByteArrayOutputStream os = new ByteArrayOutputStream()) {
+            new PngWriter().writeImage(image, os, params, paletteFactory);
+            return os.toByteArray();
+        }
+    }
+
+    private File getPngFile(String name) {
+        final File pngFolder = new 
File(ImagingTestConstants.TEST_IMAGE_FOLDER, "png");
+        return new File(pngFolder, name);
+    }
+
     @Test
     public void testNullParameters() throws IOException {
         for (String[] testTarget : testSet) {

Reply via email to