Most data-efficient way to resize image array multiple times without losing data?

edited September 2017 in How To...

Hi all!

I am working on a project with multiple animated sprites, and throughout the course of the program some sprites have to get smaller and bigger multiple times. However, they lose quality if they get smaller, and then bigger. Do I have to use the image() function with size parameters and load the images' size each frame? Is there a way to resize them without having to move the .resize function out of void setup() for data efficiency? Would using scale() be a more data-efficient way?

Thank you all for the input!

Tagged:

Answers

  • How much smaller and bigger? Are these fixed sizes, or is there a shrinking / growing transition?

    Don't resize. Keep the original and either load scaled copies -- eg from a sprite sheet -- or just keep two images (an original and a display copy) or just use scale().

Sign In or Register to comment.