tags:

views:

2085

answers:

7

PNG images appear "fuzzy" in flash CS3. They are very blocky and appear unanti-aliased (if that is a word) Does anyone have a fix for this? Is there some setting I'm missing?

+2  A: 

Are you loading them into your SWF through a loader? Or are they imported into your library as bitmap symbols? If they are loaded in try calling Bitmap.smoothing = true; or if they are in your library go to the Bitmap's properties and click Allow smoothing.

Other than that I would check to make sure you don't have some crazy above 1 alpha setting or that you aren't messing with the scale of it in your code at any time. Those two options tend to mess with bitmap images fuzziness.

If all else fails you'd probably want to look into turning your images into vector based graphics, then they'd always look exactly how you'd want them to regardless of scaling.

vanhornRF
Thanks. This increases the export time a lot, but it really helped, thanks!
pypmannetjies
Very cool, glad to help!
vanhornRF
+1  A: 

Bitmap images will be 'fuzzy' if you scale them at all, that's just the nature of graphics. Also check your publishing settings, it might be converting them to JPEG with a low quality setting.

davr
+1  A: 

If your png image is appearing 'jaggy' (or aliased rather than anti-aliased) in flash, but it looks fine in Photoshop, then it is probably due to them being A: resized, and B: not having 'smoothing' turned on (smoothing is essentially dynamic anti-aliasing).

Whenever you resize an image away from a 1:1 pixel to screen ratio then the renderer has to work out which pixels to either cut (in the case of reduction) or duplicate (in the case of enlargement).

If there is no smoothing being done then you will see jagged artifacts, especially along edge areas of high contrast.

You can turn on smoothing in the IDE by double clicking on the bitmap in your Library and checking the "Allow smoothing" checkbox.

You can also turn it on programmatically like so:

myBitmap.smoothing = true;
defmeta
A: 

Hi! The myBitmap.smoothing has absolutely no effect, if the .png image is loaded by a Loader. Does anyone know the solution? Thx!

Have you set the .jpeg quality in the publish settings to maximum?
pypmannetjies
A: 

Well I tried using image.opaqueBackground = 0x000000; and it seems working fine, antialiasing is much better, however, this beats the idea of a transparent background in the process. This is truly angering, Adobe, do something about it!

A: 

I had this same problem, and it turned out that the movie into which I had loaded the PNGs was set to an alpha of 100. This was incorrect, as in AS3 it's a value between 0 and 1. When I set the alpha of the movie to 1, the PNGs cleared up just fine.

Alan Moore
A: 

Yeah... flash does some things that make absolutely no sense.

That being said... Switching on Smoothing helped me.

Justin