Skip to main content
Inspiring
September 28, 2012
Question

Bitmap rendering problem :(

  • September 28, 2012
  • 3 replies
  • 1603 views

Hi, I'm using Flash CS5.5 and I have this app which have some vector graphics. I turn these graphics into MovieClips and select "Export as Bitmap" from the Render menu under the Display section. This makes the vector pixelated when zooming in, which is what I want, no rendering, blur etc. I use "stage.quality = "LOW" to force Flash to not blur anything, which works when I test the app in the Flash player on my PC, but on the iPhone (using 3GS), it blurs for some reason. I've also tried "stage.quality = StageQuality.LOW" in case it would make any difference, but nope. I made two buttons where A turns quality to LOW and B turns it to HIGH to see if I can see any difference on the phone when pressing them. All that happens is that the graphics moves a little bit and blurry goes to blurrier with HIGH than LOW, but both are blurry.

I did some more tests like adding a button that resizes an MC with vector art in it to double the size to see if the pixels become clean and clear then, nope, just a BIG blurry mess now instead. If I import a png into flash, that one will be crisp clear on the iPhone. Also, if I change from "Export as Bitmap" to "Cache as Bitmap", then a bitmap will be added to the library, which I can just right click on and change the property "Allow smoothing" to off, but I don't have a way to do this with those I Export as Bitmaps.

I know it's possible to turn MCs into Bitmaps using code and that way have more control, but I'm too far into this project now that I must use the Export as Bitmap, but just can't get the blur to go away . I've also tried changing "requestedDisplayResolution" in the xml to high and standard, both giving the same result.

Any ideas?

This topic has been closed for replies.

3 replies

TenchyMyoAuthor
Inspiring
September 28, 2012

Some more info that might be important:

I'm using GPU rendering and the canvas/document/resolution of the app is 320x480, the exact same as the res on my iPhone 3GS, so there's no stretching involved, it's too blurry anyway when zooming something in to be caused by stretching. I've used bitmaps a lot before in other apps, always sharp and nice, but thought if trying this new method with Export as Bitmap, but just can't get rid of the blur.

Colin Holgate
Inspiring
September 28, 2012

That's the answer to the question I was going to ask. The GPU will do its own smoothing. Try using CPU.

TenchyMyoAuthor
Inspiring
September 28, 2012

I can't use CPU because then the game will run very slow. It actually started out with CPU and vectors in MCs which I cacheAsBitmap, but now it's soooo slow because there are too many of them (I am pretty skilled so the game is almost optimized to the max, but it's still not enough for CPU, need GPU and bitmaps). So using GPU instead and making these MCs into bitmaps makes the app run at 100% speed all the time, instead of like 30% which I got with CPU.

GPU won't blur bitmaps if they are imported as pngs or if I use "Convert to Bitmap", because then I can just right click on these bitmaps in the library and turn off "Smoothing".

So I guess there is no way to remove this blur from the bitmaps when using "Export as Bitmap" then

Only way for me to continue will be to spend days of extra work using "Convert to Bitmap" instead, having 2 frames in each MC, one with the vector and the other with the bitmap of the vector, where bitmap will be the one being used, but vector on frame 2 so I always have the source for when changes are needed. Wouldn't have needed all this if I could just remove the blur from "Export as Bitmap".