int verbose;
char *outfile;
int mx;
+ int version;
} global;
typedef struct _image {
memset(swf, 0x00, sizeof(SWF));
- swf->fileVersion = 4;
+ swf->fileVersion = global.version;
swf->frameRate = (int)(256.0 * framerate);
swf->movieSize.xmax = dx * 20;
swf->movieSize.ymax = dy * 20;
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);
swf_ShapeSetLine(t, s, 0, -r.ymax);
swf_ShapeSetEnd(t);
- t = swf_InsertTag(t, ST_REMOVEOBJECT2);
- swf_SetU16(t, 1); // depth
+ if(frame) {
+ t = swf_InsertTag(t, ST_REMOVEOBJECT2);
+ swf_SetU16(t, 1); // depth
+ }
t = swf_InsertTag(t, ST_PLACEOBJECT2);
swf_GetMatrix(NULL, &m);
case 'm':
global.mx = 1;
+ global.version = 6;
+ return 0;
+
+ case 'z':
+ global.version = 6;
return 0;
case 'Y':
{"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");
global.quality = 60;
global.framerate = 1.0;
global.verbose = 1;
+ global.version = 4;
processargs(argc, argv);