Added resizeBy function to image