The ImagePool will be used in the decode process to provide an image of the right dimensions if one already exists, which, once you're done with image, can be put back into the pool. Similarly, passing in the correct size of buffer will prevent multiple mem reallocs while writing.
Added an ImagePool and a Buffer as encoder options for improved encoding efficiency:
The ImagePool will be used in the decode process to provide an image of the right dimensions if one already exists, which, once you're done with image, can be put back into the pool. Similarly, passing in the correct size of buffer will prevent multiple mem reallocs while writing.
See the benchmark test for details about usage.