fixed output file names for @2x
authorMarkus Keller <markus_keller@ch.ibm.com>
Thu, 23 Apr 2015 19:10:35 +0000 (21:10 +0200)
committerMarkus Keller <markus_keller@ch.ibm.com>
Thu, 23 Apr 2015 19:16:10 +0000 (21:16 +0200)
bundles/org.eclipse.ui.images.renderer/src/main/java/org/eclipse/ui/images/renderer/RenderMojo.java

index 7c917cb..758a481 100644 (file)
@@ -256,7 +256,8 @@ public class RenderMojo extends AbstractMojo {
         try {
             String outputName = icon.nameBase;
             if (outputScale != 1) {
-                outputName += "@" + outputScale + "x";
+                String scaleId = outputScale == (double) (int) outputScale ? Integer.toString((int) outputScale): Double.toString(outputScale);
+                outputName += "@" + scaleId + "x";
             }
             outputName += ".png";
             ImageIO.write(sourceImage, "PNG", new File(icon.outputPath, outputName));