Image scale help!

Monkey Forums/Monkey Programming/Image scale help!

chrisc2977(Posted 2012) [#1]
Hi everyone, I wonder if some1 can help.
I'm trying to scale a lot of images and the fps is rubbish,
But its confusing,
If I scale a 10px IMG to 20px speed is great but if a scale a 200px IMG to 210 it drops massivly.

I'm currently using drawImagerect and floats for the scale values.

Is there a better way to scale lots of images (500+)?


dawlane(Posted 2012) [#2]
Are you using an image atlas?


muddy_shoes(Posted 2012) [#3]
What platform are you talking about? What fps constitutes "rubbish"? Do you actually know that your performance is dropping because of the scaling? Can you post your rendering code?


chrisc2977(Posted 2012) [#4]
I'm beginning to think thats just the way it is after running examples from other modules.
I think so, is an atlas where u use a 'combined' image and draw sections of it using drawimagerect?
Fps dropping from 60 to around 20 (html).
Probably me just expecting too much from html.
Similar example is diddy GUI example the fps drops to around the same when a wibdo is maximised (thus scaling the images alot). Guessing if the wizzards at diddy couldn't keep up the fps its not possible lol


dawlane(Posted 2012) [#5]
I think so, is an atlas where u use a 'combined' image and draw sections of it using drawimagerect?
Yes it is. Using an atlas increase performance. There's some info here about it. Fourth post on.
Probably me just expecting too much from html.
Definitely.


muddy_shoes(Posted 2012) [#6]
I'm pretty sure that your performance dip is not down to scaling being expensive and all about the number of pixels being drawn.


chrisc2977(Posted 2012) [#7]
Cool, thanks everyone


skid(Posted 2012) [#8]
1. what browser? (IE9 is seriously good for drawing performance)
2. does changing from debug to release mode make any difference?
3. do you have something against Flash, IMHO it will be superior to HTML5 for a number of years yet


teremochek(Posted 2012) [#9]
It would be nice if there would be optimized, which draws only those pixels that are visible. I do not know, maybe it is not possible ..