Auto cache cleaning + better err in ImageUtilsAnd
[nikiroo-utils.git] / src / be / nikiroo / utils / ui / ImageUtilsAwt.java
index e1fcac7bd053e8b67d87a8ff5e95edb972bfffd0..0c69dc4482938ae02608be704167e23a8add13e0 100644 (file)
@@ -23,7 +23,7 @@ public class ImageUtilsAwt extends ImageUtils {
        public void saveAsImage(Image img, File target, String format)
                        throws IOException {
                try {
-                       BufferedImage image = ImageUtilsAwt.fromImage(img);
+                       BufferedImage image = fromImage(img);
 
                        boolean ok = false;
                        try {
@@ -34,7 +34,7 @@ public class ImageUtilsAwt extends ImageUtils {
                        }
 
                        // Some formats are not reliable
-                       // Second change: PNG
+                       // Second chance: PNG
                        if (!ok && !format.equals("png")) {
                                ok = ImageIO.write(image, "png", target);
                        }
@@ -61,7 +61,7 @@ public class ImageUtilsAwt extends ImageUtils {
         * @throws IOException
         *             in case of IO error
         */
-       static public BufferedImage fromImage(Image img) throws IOException {
+       public static BufferedImage fromImage(Image img) throws IOException {
                InputStream in = new ByteArrayInputStream(img.getData());
 
                int orientation;