Class | Paperclip::Geometry |
In: |
lib/paperclip/geometry_transformation.rb
|
Parent: | Object |
Returns the dimensions that would result if a thumbnail was created by transforming this geometry into that geometry. Its purpose is to mimic imagemagick conversions. Used like so:
file_geometry.transformed_by(style_geometry)
it returns the size of the thumbnail image you would get by applying that rule. This saves us having to go back to the file, which is expensive with S3. We understand all the Imagemagick geometry arguments described at www.imagemagick.org/script/command-line-processing.php#geometry including both ’^’ and paperclip‘s own ’#’ modifier.
Returns a new Geometry object with the the same dimensions as this but with no modifier.