code: def format(self):
          
          if hasattr(self.image, '_getexif'):
              self.rotate_exif()
          crop_box = self.crop_to_ratio()
          self.resize()
          return self.image, crop_box
docs: Crop and resize the supplied image. Return the image and the crop_box used.
          If the input format is JPEG and in EXIF there is information about rotation, use it and rotate resulting image.