Mobile app version of vmapp.org
Login or Join
Barnes313

: SWF file smaller than the PNG's within it? I don't understand how this is possible. I made this banner based on the design of another one. I've been struggling getting decent quality. I notice

@Barnes313

Posted in: #AdobeFlash

I don't understand how this is possible. I made this banner based on the design of another one. I've been struggling getting decent quality. I notice the quality is pretty good in the one I'm copying. I decompiled and saw that the images alone are 125kb. This is bizarre because the total size of the swf is only 45kb. What the hell is going on here?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Barnes313

1 Comments

Sorted by latest first Latest Oldest Best

 

@LarsenBagley460

It seems that if the source PNG file is too big (and in this case, even 25 kB seems to be "too big"), Flash decides to use JPG compression on the imported file by default.

The default amount of JPG compression is defined under Publish Settings… → Flash → Images and Sounds.

The compression can be overridden by–object basis through the Library window to either different amount of JPG compression or to lossless PNG/GIF "compression":


Choose the bitmap file you want to edit from the Library
Right click → choose Properties…
Click OK


If you want to preview the results, click Update and review the results





Note that the original PNG is 25 kB and Flash reports its lossless file size as 135.6 kB; it may be the case that Flash will base its calculation to a redrawn bitmap.



This might answer your question — or not. I noticed that a SWF file containing just the PNG image (25 kB) results in a file size of 16 kB. (For what it's worth, a SWF file containing the same PNG image, this time compressed with 97 JPG compression, results in a file size of 20 kB (well, the increase was expected))

So Flash does some abracadabra in between of which I currently have no idea; but changing the default compression to your liking might solve the crippled image quality of your SWF output.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme