Jump to content
Search Community

Scaling Blitmask Target Before Caching

ptc test
Moderator Tag

Recommended Posts

Hi,

I would like to know if it is possible to scale a blitmasks target directing before caching a bitmap. That way the bitmap wouldn't take up so much of the devices memory, and performance could be improved when using very large bitmaps.

 

What I mean is, setting a property on the blitmask to scale the target to say 50% of width/height. Then having the blitmask display the bitmap at full scale but lower resolution. Is this possible at all with the blitmask? I think it would be a good idea considering so many devices now have HD screens.

 

cheers

Link to comment
Share on other sites

Ah, maybe I didn't  explain myself properly here. I don't want things to look fuzzy, that would be bad.

 

I think your blitmask works great on iPad. When I'm packaging for iPad I can set the device to not use the retina display. I do this in the manifest file. On the latest iPad the blitmask looks nice and smooth, almost to the point where it seems GPU accelerated (obviously not quite that good). The problem I have, is that on android devices I cannot set the desired resolution through the manifest file (as far as I'm aware). Therefore performance will suffer on android devices with high resolution screens. I just though if we had a way to set the resolution of the blitmask it would help improve performance on android devices.

Link to comment
Share on other sites

You could pretty much control that kind of thing (if I understand you correctly) by wrapping your object in a Sprite and scaling it up or down before you apply the BlitMask to it. The BlitMask just captures it at whatever size it is in its parent, pixel-for-pixel. So, for example, if you give it a scale of 0.5 and then apply the BlitMask to it, the BlitMask would capture half the number of pixels compared to when it's at full scale. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...