fix buffer size check
methods to resize images
avoid copying pixels decoding png's
avoid copying pixels decoding jpeg's
avoid copying pixels while converting colors