Resize function pixel mapping

How does the Resize function operate when it maps to new pixel data?

Say you are reducing an image size by 1/2. Does this AVERAGE the 2 pixels that are to be mapped to the new one or is a single pixel selected from the 2 and mapped to the new one?

Would save a bit of coding if it averages.



take a look in the source code here:…-e.cpp#L472

there you can see that oF uses FreeImage for its image processing. For rescale it uses the FILTER_BICUBIC constant wich is explained here:

hope this helps,