X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fswfextract.c;h=13294164f5ed03ac56cd20967ebefecc04f1c60b;hb=e13dadaccdf66f62f4be27291963a3587cad2826;hp=ee15f6235d044dec271a14a6affe24d82c4a00c7;hpb=3de83640b8a9cfd821efc91a73952278fa69f8fc;p=swftools.git diff --git a/src/swfextract.c b/src/swfextract.c index ee15f62..1329416 100644 --- a/src/swfextract.c +++ b/src/swfextract.c @@ -368,6 +368,7 @@ void extractTag(SWF*swf, char*filename) } if(number>=2) printf("warning! You should use the -P when extracting multiple objects\n"); + if(number == 1) { /* if there is only one object, we will scale it. So let's figure out it's bounding box */ @@ -380,10 +381,15 @@ void extractTag(SWF*swf, char*filename) } tag = tag->next; } - } + newswf.movieSize.xmin = 0; + newswf.movieSize.ymin = 0; + newswf.movieSize.xmax = 512*20; + newswf.movieSize.ymax = 512*20; + } else { + if((objectbbox.xmin|objectbbox.ymin|objectbbox.xmax|objectbbox.ymax)!=0) + newswf.movieSize = objectbbox; + } - if((objectbbox.xmin|objectbbox.ymin|objectbbox.xmax|objectbbox.ymax)!=0) - newswf.movieSize = objectbbox; if(extractname_id>=0) { desttag = swf_InsertTag(desttag, ST_PLACEOBJECT2); swf_ObjectPlace(desttag, extractname_id, extractname_id, 0,0,extractname); @@ -403,7 +409,7 @@ void extractTag(SWF*swf, char*filename) m.sx = (512*20*65536)/max; m.sy = (512*20*65536)/max; } - newswf.movieSize = swf_TurnRect(newswf.movieSize, &m); + //newswf.movieSize = swf_TurnRect(newswf.movieSize, &m); } swf_ObjectPlace(desttag, t, t, &m,0,0); }