X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fjpeg2swf.c;h=16efc3c8dbb5d957e152afcb4cececb1070f8c3a;hb=6bc6f6368354fb8d16e9a8fb005135a7ac5d16e8;hp=8de7c1ad4d6e846bb77e049cc7025cf745668bdf;hpb=27dde1bf85a1656f41f10ecb7f68af555bfa7dd3;p=swftools.git diff --git a/src/jpeg2swf.c b/src/jpeg2swf.c index 8de7c1a..16efc3c 100644 --- a/src/jpeg2swf.c +++ b/src/jpeg2swf.c @@ -93,8 +93,14 @@ int MovieFinish(SWF * swf, TAG * t, char *sname) sname = "output.swf"; handle = open(sname, O_BINARY | O_RDWR | O_CREAT | O_TRUNC, 0666); } - if (swf_WriteSWF(handle, swf)<0) - fprintf(stderr, "Unable to write output file: %s\n", sname); + 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 != so) close(handle); @@ -372,6 +378,10 @@ int args_callback_option(char *arg, char *val) global.version = 6; return 0; + case 'z': + global.version = 6; + return 0; + case 'Y': if (val) global.force_height = atoi(val); @@ -401,6 +411,7 @@ static struct options_t options[] = { {"m", "mx"}, {"q", "quality"}, {"r", "rate"}, +{"z", "zlib"}, {"X", "width"}, {"Y", "height"}, {"v", "verbose"}, @@ -443,6 +454,7 @@ void args_callback_usage(char *name) printf("-m , --mx Use Flash MX H.263 compression (use for correlated images)\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("-z , --zlib Enable Flash 6 (MX) Zlib Compression\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");