Image Resizing with Rails and ImageMagick

Image Resizing with Rails and ImageMagick

The Rails uses ImageMagick for creating thumbnail images, etc.


256x256

This specifies the Maximum dimensions for the image, while preserving the aspect ratio of the image. So if your image were actually 512x256 it would be resized to 256x128 in order to fit inside the specified size.

256x256!

This specifies the Exact image size, so a 512x256 image would be changed into 256x256, losing the aspect ratio.

256x

This specifies the desired width of the target image, leaving the height to be set so as to preserve the aspect ratio.

x256

This specifies the desired height of the target image, while preserving the aspect ratio.

256x256^

This specifies the Minimum size for the target image, so the resized image may be larger than these dimensions.

256x256>

This specifies that the image will be resized only if it is Larger than the dimensions.

256x256<

This specifies that the image will be resized only if it is Smaller than the dimensions.

No comments

Powered by Blogger.