global.version = 6;
return 0;
+ case 'z':
+ global.version = 6;
+ return 0;
+
case 'Y':
if (val)
global.force_height = atoi(val);
{"m", "mx"},
{"q", "quality"},
{"r", "rate"},
+{"z", "zlib"},
{"X", "width"},
{"Y", "height"},
{"v", "verbose"},
printf("-m , --mx Use Flash MX H.263 compression (use for correlated images)\n");
printf("-q , --quality <quality> Set compression quality (1-100, 1=worst, 100=best)\n");
printf("-r , --rate <framerate> Set movie framerate (frames per second)\n");
+ printf("-z , --zlib <zlib> Enable Flash 6 (MX) Zlib Compression\n");
printf("-X , --width <width> Force movie width to <width> (default: autodetect)\n");
printf("-Y , --height <height> Force movie height to <height> (default: autodetect)\n");
printf("-v , --verbose <level> Set verbose level to <level> (0=quiet, 1=default, 2=debug)\n");
This option can be set independently for each image.
-r --rate <framerate>
Set movie framerate (frames per second)
+-z --zlib <zlib>
+ Enable Flash 6 (MX) Zlib Compression
+ Use Flash MX (SWF 6) Zlib encoding for the output. The resulting SWF will be
+ smaller, but not playable in Flash Plugins of Version 5 and below.
-X --width <width>
Force movie width to <width> (default: autodetect)
-Y --height <height>
int nfiles;
int verbose;
int do_cgi;
+ int version;
char *outfile;
} global;
memset(swf, 0x00, sizeof(SWF));
- swf->fileVersion = 5;
+ swf->fileVersion = global.version;
swf->frameRate = (int)(256.0 * framerate);
swf->movieSize.xmax = dx * 20;
swf->movieSize.ymax = dy * 20;
if(global.do_cgi) {
if FAILED(swf_WriteCGI(swf)) fprintf(stderr,"WriteCGI() failed.\n");
} else {
- if FAILED(swf_WriteSWF(f,swf)) fprintf(stderr,"WriteSWF() failed.\n");
+ 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 (f != so)
close(f);
}
res = 1;
break;
+ case 'z':
+ global.version = 1;
+ res = 1;
+ break;
+
case 'C':
global.do_cgi = 1;
break;
static struct options_t options[] = {
{"r", "rate"},
{"o", "output"},
+{"z", "zlib"},
{"X", "pixel"},
{"Y", "pixel"},
{"v", "verbose"},
printf("\n");
printf("-r , --rate <framerate> Set movie framerate (frames per second)\n");
printf("-o , --output <filename> Set name for SWF output file.\n");
+ printf("-z , --zlib <zlib> Enable Flash 6 (MX) Zlib Compression\n");
printf("-X , --pixel <width> Force movie width to <width> (default: autodetect)\n");
printf("-Y , --pixel <height> Force movie height to <height> (default: autodetect)\n");
printf("-v , --verbose <level> Set verbose level (0=quiet, 1=default, 2=debug)\n");
global.framerate = 1.0;
global.verbose = 1;
+ global.version = 4;
processargs(argc, argv);
-o, --output <filename>
Set name for SWF output file.
Explicitly specify output file. (Otherwise, output will go to stdout / output.swf)
+-z --zlib <zlib>
+ Enable Flash 6 (MX) Zlib Compression
+ Use Flash MX (SWF 6) Zlib encoding for the output. The resulting SWF will be
+ smaller, but not playable in Flash Plugins of Version 5 and below.
-X, --pixel <width>
Force movie width to <width> (default: autodetect)
-Y, --pixel <height>