@zogstrip, qu’en penses-tu ?
if crop
cropped_width, cropped_height = ImageSizer.crop(original_width, original_height)
if cropped_width < width
width = cropped_width
img["width"] = width
end
if cropped_height < height
height = cropped_height
img["height"] = height
end
end
Par rapport à l’existant :
C’est certainement moins surprenant que le comportement actuel et cela rendrait @awesomerobot heureux. Le seul vrai inconvénient que je vois, c’est que ce test est très, très, très artificiel.
Si tu le souhaites, n’hésite pas à faire un commit.