written image resize method, now the imageButton works letting you choice an image from the gallery