[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Swftools-common] resizing
From: |
Matthias Kramm |
Subject: |
Re: [Swftools-common] resizing |
Date: |
Wed, 13 Aug 2008 12:06:59 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
On Wed, Aug 06, 2008 at 07:55:44PM +0200, Daniel Caillibaud <address@hidden>
wrote:
> I just see this interesting post.
> Since which swftools version is this implemented ?
0.8.1 I think.
> This option is a good one, but I don't really understand how to use it in
> case I want an image just at the double resolution (to have the good
> resolution with a zoom x2).
> I tried -s subpixels=0.5 and -s subpixels=2
The latter should work.
> but in both case, I have a
> better result on zoom without this option set. Is this normal ?
What do you mean with "better"?
> PS2: just for the fun, my last command line with png2swf & swf combine (to
> put a big png (zoom) in a 600x820 swf with the good position). We can see
> that most of the work is to write the right awk expression, not choosing
> the good args for swftools ;-)
>
> for f in png_src/*.png; do \
> echo; echo $f; \
> eval $(identify $f|sed -e 's/.*PNG \([0-9]\+\)x\([0-9]\+\).*/\1 \2/'|awk
> '{x=$1; y=$2};
> END {
> a=60000/x; b=82000/y;
> if (a < b) {
> scale=a; decaly=(820-y*scale/100)/2;
> if (decaly >20) arg="-y 20 ";
> else arg="-y " decaly -decaly % 1
> } else {
> scale=b; decalx=(600-(x*scale/100))/2; arg="-x " decalx - decalx % 1
> };
> print "scale=" scale " arg=\"" arg "\""
> }'); \
> echo "We have scale=$scale and arg=$arg"; \
> png2swf -s $scale -o tmp.swf $f; \
> swfcombine -T -o swf/$(basename $f .png).swf white_background_600x820.swf
> $arg tmp.swf;\
> done;
Oh wow- that's one large awk expression :)
Greetings
Matthias