Flash CS4 Export As 24bit+Alpha PNG Solution
Today I was going through some design files that were sent to me to be added to a website I’m helping to develop. The designs were drawn in Flash CS4. I needed to work with these files in Photoshop, so I went to export the files as a 24-bit PNG with Alpha and blending, except Flash decided it wasn’t going to play nice.

The picture on the left is how the image appears in Flash, and on the right is the exported PNG. The problem is that Flash wasn’t correctly handling the alpha during export. So instead of the smooth edges in the left image, we have the ugly aliased edges seen on the right.
What I needed was the alpha information, or at the very least, an alpha mask. Since Flash wasn’t behaving, here’s how I made one:
- Export the image twice; once with a black background, and once with a white background. Instead of exporting as “24 bit with alpha channel”, simply export it as “24 bit”. Other than the background, the images should be identical.
- Open both the images in Photoshop, and put them in the same document.
- Select the top-most layer, and set its blending mode to “Difference”.

- Merge the layers (Layer > Flatten Image).
- Invert the document (Image > Adjustments > Invert).
What you should now have is a greyscale image. The background should be black, and all the features white.

- Select the entire document, and copy it.
- Open one of the images you exported, and create a new layer mask (Layer > Layer Mask > Reveal All).
- Paste the greyscale image into the mask.


You should now have an image with perfectly smoothed edges. If you notice a slight white or black outline surrounding the edges, you can use “Defringe” or “Remove White\Black Matte” from the Image menu.
Enjoy!
Friday, March 20th, 2009 @ 04:56 PM • 6 responces