From 10be3e302f4cbfe6f1e2d1d3c1ed8ee05b773f0f Mon Sep 17 00:00:00 2001 From: nathan Date: Sat, 8 Jul 2017 23:58:08 +0200 Subject: [PATCH] Changed createTransparentImage -> createImage. If a null color is used, it will be transparent --- src/dorkbox/systemTray/util/ImageResizeUtil.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/dorkbox/systemTray/util/ImageResizeUtil.java b/src/dorkbox/systemTray/util/ImageResizeUtil.java index 7e117f4..bd7f718 100644 --- a/src/dorkbox/systemTray/util/ImageResizeUtil.java +++ b/src/dorkbox/systemTray/util/ImageResizeUtil.java @@ -48,13 +48,13 @@ class ImageResizeUtil { // NOTE: this does not need to be called on the EDT try { final File newFile = CacheUtil.create(imageSize + "_empty.png"); - return ImageUtil.getTransparentImage(imageSize, newFile); + return ImageUtil.createImage(imageSize, newFile, null); } catch (IOException e) { throw new RuntimeException("Unable to generate transparent image! Something is severely wrong!"); } } - private static + public static File getErrorImage(int size) { if (size == 0) { // default size @@ -83,8 +83,7 @@ class ImageResizeUtil { File resizedFile = resizeFileNoCheck(size, imageStream); // now cache that file - File save = CacheUtil.save(cacheName, resizedFile); - return save; + return CacheUtil.save(cacheName, resizedFile); } catch (Exception e) { // this must be thrown throw new RuntimeException("Serious problems! Unable to extract error image, this should NEVER happen!", e);