class imageResize for PhoneGap