int do_cgi;
int version;
char *outfile;
+ float scale;
} global;
struct {
swf_ShapeNew(&s);
swf_GetMatrix(NULL, &m);
- m.sx = 20 * 0x10000;
- m.sy = 20 * 0x10000;
+ m.sx = (int)(20 * 0x10000);
+ m.sy = (int)(20 * 0x10000);
m.tx = -10;
m.ty = -10;
fs = swf_ShapeAddBitmapFillStyle(s, &m, id, 1);
t = swf_InsertTag(t, ST_PLACEOBJECT2);
swf_GetMatrix(NULL, &m);
+ m.sx = (int)(0x10000 * global.scale);
+ m.sy = (int)(0x10000 * global.scale);
+
if(custom_move) {
m.tx = move_x*20;
m.ty = move_y*20;
} else {
- m.tx = (swf->movieSize.xmax - (int) header.width * 20) / 2;
- m.ty = (swf->movieSize.ymax - (int) header.height * 20) / 2;
+ m.tx = (swf->movieSize.xmax - (int) (header.width * global.scale * 20)) / 2;
+ m.ty = (swf->movieSize.ymax - (int) (header.height * global.scale * 20)) / 2;
}
swf_ObjectPlace(t, id + 1, 50, &m, NULL, NULL);
res = 1;
break;
+ case 's':
+ global.scale = atof(val)/100;
+ res = 1;
+ break;
+
case 'z':
global.version = 6;
res = 0;
global.framerate = 1.0;
global.verbose = 1;
global.version = 4;
+ global.scale = 1.0;
processargs(argc, argv);
fprintf(stderr, "Processing %i file(s)...\n", global.nfiles);
t = MovieStart(&swf, global.framerate,
- global.force_width ? global.force_width : global.
- max_image_width,
- global.force_height ? global.force_height : global.
- max_image_height);
+ global.force_width ? global.force_width : (int)(global.max_image_width*global.scale),
+ global.force_height ? global.force_height : (int)(global.max_image_height*global.scale));
{
int i;