PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

E2DSurface's resize() waste too much time,how to handle that

resize() waste too much time,how to handle that?
Hi SunFred,

The Resize() function should only be used at load-time, it isn't a realtime function because it uses filtering to improve downscaling quality.

For realtime operations, use Blt(). If you're loading and resizing a lot of images (and you want it to be faster), you could also cache the rescaled images. For caching you can write the resulting image as PNG and load it the next time you start the game (instead of the original, non-scaled images).