I am using Attachment_fu to upload images.
I need to convert .tiff images into .jpeg format after uploading image in application.
I used below code:
:styles => {
:thumb => ["150x172#",:jpg],
:large => ["100%", :jpg]
},
But it is not useful for me.
Please help me how to convert image format?
As already implied in your tags ImageMagic will do the trick. You can either use the
convertcommand line utility or use its ruby binding RMagic. In the latter case you just have to read the image and write it again with the new name. The above documentation says:You can also read and write from a string if you do not want the file on disk.