X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fpng2swf.c;h=2146ef7d3ce9c1c8937b28ce8351052f0f406ed7;hb=9920f31d5204693619eb64cbbcfa7d472f40e79f;hp=b1827ed293ab1f71bceabe79440e0dddedf883ce;hpb=d0944e4403dd2736e0dde1ba0a6558f71df8da70;p=swftools.git diff --git a/src/png2swf.c b/src/png2swf.c index b1827ed..2146ef7 100644 --- a/src/png2swf.c +++ b/src/png2swf.c @@ -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; + } } } } @@ -776,7 +779,9 @@ int args_callback_option(char *arg, char *val) case 'r': if (val) global.framerate = atof(val); - if ((global.framerate < 1.0/256) ||(global.framerate >= 256.0)) { + /* removed framerate>0 restriction in order to make + Flash Communication Server compatible SWFs */ + if ((global.framerate < 0) ||(global.framerate >= 256.0)) { if (VERBOSE(1)) fprintf(stderr, "Error: You must specify a valid framerate between 1/256 and 255.\n");