RailsCasts Pro episodes are now free!

Learn more or hide this

Blake Ward's Profile

GitHub User: BlakeWard

Comments by Blake Ward

Avatar

When you add resize_to_limit(600, 600) to the crop method to solve the problem that the x,y,width,height are relative to the :large image, it seems like you potentially lose some resolution.

It certainly makes sense to scale the image down to something reasonable before displaying it in the cropping UI, but if you're using this to generate a new image that's bigger than a thumbnail, it would be really nice to be cropping from the big image, not the 600x600 one. Seems like it would be better to scale the x, y, width and height values to work with the original image rather than scale the image.

What would be the most efficient way to get the dimensions of the original image in the crop method so that one could scale the values instead of scaling the image?