def get_height(img)
      new_height = (img.height / (img.width.to_f / self.width.to_f)).ceil
    end
def get_height(img)
      new_height = (img.height / (img.width.to_f / self.width.to_f)).ceil
    end
Finds height of the image relative to provided width