ilbmtoicon: Refuse to generate icons with differently sized select and normal images
authorjmcmullan <jmcmullan@fb15a70f-31f2-0310-bbcc-cdcc74a49acc>
Wed, 28 Nov 2012 21:03:57 +0000 (28 21:03 +0000)
committerjmcmullan <jmcmullan@fb15a70f-31f2-0310-bbcc-cdcc74a49acc>
Wed, 28 Nov 2012 21:03:57 +0000 (28 21:03 +0000)
Signed-off-by: Jason S. McMullan <jason.mcmullan@gmail.com>
git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@46118 fb15a70f-31f2-0310-bbcc-cdcc74a49acc

tools/ilbmtoicon/ilbmtoicon.c

index b6be462..9feaf23 100644 (file)
@@ -2095,7 +2095,14 @@ int main(int argc, char **argv)
     getarguments(argc, argv);
     parseiconsource();
     loadimage(image1option, &img1);
-    if (image2option) loadimage(image2option, &img2);
+    if (image2option) {
+        loadimage(image2option, &img2);
+        if ((img2.bmh.bmh_Width && img2.bmh.bmh_Width != img1.bmh.bmh_Width) ||
+            (img2.bmh.bmh_Height && img2.bmh.bmh_Height != img1.bmh.bmh_Height)) {
+            fprintf(stderr, "%s: Image %s (%dx%d) is not the same size as Image %s (%dx%d)\n", argv[0], image1option, img1.bmh.bmh_Width, img1.bmh.bmh_Height, image2option, img2.bmh.bmh_Width, img2.bmh.bmh_Height);
+        }
+    }
+                        
     remapicon();
     writeicon();