X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fjpeg2swf.c;h=b53958a0fe27a1916f6e676cb3ebc00254440c56;hb=ac8c6f00fbaa94b3136457caf1a24d8f4f0c12cc;hp=e83d411ad4413a8dbe9599511df2d22dafc2ccee;hpb=aef51a898cfdddcf22bc008fdf34e4ff5c557486;p=swftools.git diff --git a/src/jpeg2swf.c b/src/jpeg2swf.c index e83d411..b53958a 100644 --- a/src/jpeg2swf.c +++ b/src/jpeg2swf.c @@ -136,13 +136,11 @@ int MovieFinish(SWF * swf, TAG * t, char *sname) sname = "output.swf"; handle = open(sname, O_BINARY | O_RDWR | O_CREAT | O_TRUNC, 0666); } - if(global.version >= 6) { - if (swf_WriteSWC(handle, swf)<0) - fprintf(stderr, "Unable to write output file: %s\n", sname); - } else { - if (swf_WriteSWF(handle, swf)<0) - fprintf(stderr, "Unable to write output file: %s\n", sname); + if(handle<0 && sname) { + perror(sname); } + if (swf_WriteSWF(handle, swf)<0) + fprintf(stderr, "Unable to write output file: %s\n", sname); if (handle != so) close(handle); @@ -495,6 +493,12 @@ int args_callback_option(char *arg, char *val) break; } + case 'M': { + global.mx = 1; + res = 1; + break; + } + case 'm': { char*s = strdup(val); char*c = strchr(s, ':'); @@ -537,6 +541,9 @@ static struct options_t options[] = { {"q", "quality"}, {"r", "rate"}, {"z", "zlib"}, +{"M", "mx"}, +{"x", "xoffset"}, +{"y", "yoffset"}, {"X", "width"}, {"Y", "height"}, {"v", "verbose"}, @@ -579,8 +586,11 @@ void args_callback_usage(char *name) printf("\n"); printf("-o , --output Explicitly specify output file. (otherwise, output.swf will be used)\n"); printf("-q , --quality Set compression quality (1-100, 1=worst, 100=best)\n"); - printf("-r , --rate Set movie framerate (frames per second)\n"); + printf("-r , --rate Set movie framerate (frames per second)\n"); printf("-z , --zlib Enable Flash 6 (MX) Zlib Compression\n"); + printf("-M , --mx Use Flash MX H.263 compression (use for correlated images)\n"); + printf("-x , --xoffset horizontally offset images by \n"); + printf("-y , --yoffset vertically offset images by \n"); printf("-X , --width Force movie width to (default: autodetect)\n"); printf("-Y , --height Force movie height to (default: autodetect)\n"); printf("-v , --verbose Set verbose level to (0=quiet, 1=default, 2=debug)\n");