openframeworks/openFrameworks — pull request #3043 by ericgunther (2014-06-23 18:41:45+00:00)
Title: Added destroyPixels option to ofImage

When you're loading lots of big images in your app, system memory gets eaten up very quickly by ofImage pixel data. In many situations, once the pixels are loaded into texture memory, the pixel data is no longer needed.

So we've added in an optional flag (that defaults to false for backward compatibility) to free the pixel memory once the data has been loaded into texture memory.

This code has been tested on OSX.