reworked compression handling logic
[swftools.git] / src / swfcombine.c
index 72d1147..b4dbfb9 100644 (file)
@@ -161,6 +161,16 @@ int args_callback_option(char*name,char*val) {
        config.scalex = config.scaley = atoi(val)/100.0;
        return 1;
     }
+    else if (!strcmp(name, "w"))
+    {
+       config.scalex = atoi(val)/100.0;
+       return 1;
+    }
+    else if (!strcmp(name, "h"))
+    {
+       config.scaley = atoi(val)/100.0;
+       return 1;
+    }
     else if (!strcmp(name, "t") || !strcmp(name, "T"))
     {
        if(master_filename) {
@@ -275,7 +285,7 @@ void args_callback_usage(char *name)
     printf("-f , --frame                   The following identifier is a frame or framelabel, not an id or objectname\n");
     printf("-x , --movex <xpos>            x Adjust position of slave by <xpos> pixels\n");
     printf("-y , --movey <ypos>            y Adjust position of slave by <ypos> pixels\n");
-    printf("-s , --scale <scale>           Adjust size of slave by <scale> percent (e.g. 100% = original size)\n");
+    printf("-s , --scale <scale>           Adjust size of slave by <scale> percent (e.g. 100%% = original size)\n");
     printf("-r , --rate <fps>              Set movie framerate to <fps> (frames/sec)\n");
     printf("-X , --width <width>           Force movie bbox width to <width> (default: use master width (not with -t))\n");
     printf("-Y , --height <height>          Force movie bbox height to <height> (default: use master height (not with -t))\n");
@@ -1273,9 +1283,10 @@ int main(int argn, char *argv[])
     if(config.zlib) {
        if(newswf.fileVersion < 6)
            newswf.fileVersion = 6;
-       swf_WriteSWC(fi, &newswf);
+        newswf.compressed = 1;
+       swf_WriteSWF(fi, &newswf);
     } else {
-       newswf.compressed = 0;
+       newswf.compressed = -1; // don't compress
        swf_WriteSWF(fi, &newswf);
     }
     close(fi);