Another interesting observation here is :
1. Took the page converted by the previous version and compared it with
the newer one using /swfextract/ and then /swfdump/.
2. It seems that the older one used to store image content as a PNG
while now the preferred choice is JPEG.
/New
[-i] 3 Shapes: ID(s) 1, 2, 4
*[-j] 1 JPEG: ID(s) 3*
[-f] 1 Frame: ID(s) 0
/
/Old
[-i] 3 Shapes: ID(s) 1, 2, 4
* [-p] 1 PNG: ID(s) 3*
[-f] 1 Frame: ID(s) 0
/3. Dump from swfdump
/New/
/[HEADER] File version: 9
[HEADER] File is zlib compressed. Ratio: 95%
[HEADER] File size: 691240
[HEADER] Frame rate: 0.250000
[HEADER] Frame count: 1
[HEADER] Movie width: 610.00
[HEADER] Movie height: 1004.00
[045] 4 FILEATTRIBUTES usenetwork as3
[009] 3 SETBACKGROUNDCOLOR (ff/ff/ff)
[020] 34 DEFINESHAPE3 defines id 0001
[01a] 7 PLACEOBJECT2 places id 0001 at depth 0001 (clip to
0003)
[020] 40 DEFINESHAPE3 defines id 0002
[01a] 5 PLACEOBJECT2 places id 0002 at depth 0002
[015] *691055 DEFINEBITSJPEG2 defines id 0003*
[002] 40 DEFINESHAPE defines id 0004
[01a] 5 PLACEOBJECT2 places id 0004 at depth 0003
[001] 0 SHOWFRAME 1 (00:00:00,000)
[000] 0 END/
/Old /
/[HEADER] File version: 9
[HEADER] File is zlib compressed. Ratio: 98%
[HEADER] File size: 150826
[HEADER] Frame rate: 0.250000
[HEADER] Frame count: 1
[HEADER] Movie width: 610.00
[HEADER] Movie height: 1004.00
[309] 3 REFLEX
[045] 4 FILEATTRIBUTES
[009] 3 SETBACKGROUNDCOLOR (ff/ff/ff)
[020] 34 DEFINESHAPE3 defines id 0001
[01a] 7 PLACEOBJECT2 places id 0001 at depth 0001 (clip to
0003)
[020] 40 DEFINESHAPE3 defines id 0002
[01a] 5 PLACEOBJECT2 places id 0002 at depth 0002
*[014] 150636 DEFINEBITSLOSSLESS defines id 0003 image 1272x2092 (8 bpp)*
[002] 40 DEFINESHAPE defines id 0004
[01a] 5 PLACEOBJECT2 places id 0004 at depth 0003
[001] 0 SHOWFRAME 1 (00:00:00,000)
[000] 0 END/
4. Could this be the reason for the size bloat (as PNG has a better
compression ratio compared to JPEG.) ?
5. As size of swf goes up there is substantial cost increase in terms
of storage and time (time required to transmit and render these large
sized pages onto a browser)
and this leads to overall lower performance in my opinion.
6. I was wondering about the reason behind using jpeg as the choice of
storing image content instead of png.
7. Is there a way of forcing pdf2swf to use png in place of jpeg ..?
Thnx,
Sameer
On 26/08/2010 11:04, Sameer Atre wrote:
Done - it worked !
Tried out with subpixels=1 and subpixels=2.
I found subpixels to be most effective; swf size came down from 3MB to about
700KB and rendering quality was preserved.
With subpixels 1 the size went down drastically to 200KB but quality
deteriorated .
Cheers,
Sam
On Mon, Aug 23, 2010 at 04:55:05PM +0530, Sameer Atre<addr...@hidden> wrote:
>/ I've been a vivid user of pdf2swf since 2 - 3 years./
>/ After upgrading to ver. 0.9.1 I find that source pdf's with image/
>/ content get converted into very large sized swf's./
>/ Eg : In one instance the same pdf that used to result in swf's of size/
>/ 500 KB has now become 3 MB !!/
>/ But for pdfs with text content the reverse is seen. i.e swfs have become/
>/ smaller. Am I missing something here please ?/
Try downscaling the images- that might help:
pdf2swf -s subpixels=1 file.pdf -o file.swf
Matthias