I need the ability to put the processed image's dimensions.
I have in my ImageUploader
class:
version :post do
process :resize_to_fit => [200, nil]
end
Is there a way that I could get the image's dimensions similar to this?
height = @picture.image_height(:post)
You can hook onto the :cache and :retrieve_from_cache methods
There is no need to rely on system commands either:
http://www.glebm.com/2012/05/carrierwave-image-dimensions.html
You can adjust and use the method described here: http://code.dblock.org/carrierwave-saving-best-image-geometry
It adds a process then call Magick's method to fetch image geometry.
Code:
i googled some around a came onto a post with the following:
source link http://groups.google.com/group/carrierwave/browse_thread/thread/c5e93b45bde8a85e?fwc=1&pli=1