Discussion Forums
- Topic List
- Most Recent Posts
- Sign In for more options
Hi
I want to calculate aspectratio and crop images into that dimention and am using rmagick to crop.
Can anybody help
Hi,
Try following links to calculate aspect ratio ..
http://andrew.hedges.name/experiments/aspect_ratio/
http://www.digitalrebellion.com/aspect_calc.htm
Or if you want maintain aspect ration with Rmagick then.. try this..
"If only the width is specified, the width assumes the value and the height is chosen to maintain the aspect ratio of the image. Similarly, if only the height is specified (e.g., "x256"), the width is chosen to maintain the aspect ratio. To specify a percentage width or height instead, append %. The image size is multiplied by the width and height percentages to obtain the final image dimensions. To increase the size of an image, use a value greater than 100 (e.g. 125%). To decrease an image's size, use a percentage less than 100."
Reference... http://www.imagemagick.org/RMagick/doc/imusage.html
Good Luck ;)
-Ganesh K
Hi , Am calcualting aspectration to crop images .Finally calculated aspectration i got 4 inches extra for my actual aviable height of the image. So i want to crop the image top and bottom equally .I mean top 2 inches and bottom inches crop the height of the image.Can anybody suggest solution
