On *nix, png2swf couldn't find 'foo.Png' if command line was given as
[swftools.git] / src / png2swf.c
index b1827ed..6cf4189 100644 (file)
@@ -688,7 +688,9 @@ TAG *MovieAddFrame(SWF * swf, TAG * t, char *sname, int id)
     swf_GetMatrix(NULL, &m);
     m.sx = 20 * 0x10000;
     m.sy = 20 * 0x10000;
-    fs = swf_ShapeAddBitmapFillStyle(s, &m, id, 0);
+    m.tx = -10;
+    m.ty = -10;
+    fs = swf_ShapeAddBitmapFillStyle(s, &m, id, 1);
 
     swf_SetU16(t, id + 1);     // id
 
@@ -744,9 +746,10 @@ int CheckInputFile(char *fname, char **realname)
            sprintf(s, "%s.PNG", fname);
            if ((fi = fopen(s, "rb")) == NULL) {
                sprintf(s, "%s.Png", fname);
-               if ((fi = fopen(s, "rb")) == NULL)
+               if ((fi = fopen(s, "rb")) == NULL) {
                    fprintf(stderr, "Couldn't open %s!\n", fname);
                    return -1;
+               }
            }
        }
     }