Fixed to work with padded CGImages.

Fix for https://github.com/hfossli/AGGeometryKit/issues/4