added methods for resizing GM and libvips