swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swftools-common] resizing


From: raphael benzazon
Subject: Re: [Swftools-common] resizing
Date: Sat, 13 Sep 2008 13:38:21 +0000

Hi Matthias,

    I'm using the new option subpixels, which is exactly what i need. The problem is that from the value 1 to 2 i don't see any difference, including the swf's file size.

    Here is the command :

pdf2swf -s poly2bitmap -s subpixels=1 -T8 -f -s fontquality=100 -s jpegquality=90 file.pdf  file.swf


pdf2swf -s poly2bitmap -s subpixels=2 -T8 -f -s fontquality=100 -s jpegquality=90 file.pdf  file.swf

The two swf files have the same size.

   It seems that the subpixels option has no effect when poly2bitmap is used. It would be nice to have this option working, because when a pdf is too complex, it's often because of an artwork, which could be zoomed. But with poly2bitmap, the grid is scaled at 1:1 so the quality is somehow lost.

Thx a lot for your awesome work



Matthias Kramm a écrit :
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






  



Qui vous permet d'enregistrer la TV sur votre PC et lire vos emails sur votre mobile ? la réponse en vidéo la réponse en vidéo

reply via email to

[Prev in Thread] Current Thread [Next in Thread]