Adding support for generic image operations. hflip and vflip made to use this now