Converting a tiff image

Does anyone know of a way to convert an uploaded tiff image into a jpg
or png?

Mike Chai wrote:

Does anyone know of a way to convert an uploaded tiff image into a jpg
or png?

Thanks. How can I use paperclip to convert? I tried looking it up in
google but got no results.

On 23 Feb 2010, at 23:19, Mike C wrote:

Use :convert_options as shown here:
http://www.taknado.com/en/2009/10/01/paperclip-tweaks/
(found using “paperclip rails convert file” on google). Someone else
will be able to give you the imagemagick command parameter to convert
to jpg I hope, don’t know it by heart.

Best regards

Peter De Berdt

This is actually used with AttachmentFu, but has some example code for
Rmagick resizing:

Cheers,
Walter

On Wed, Feb 24, 2010 at 12:24 PM, Peter De Berdt

The #59 meaning the relevant line is mainly the setting of format in
line 59. There is other stuff in their you may find useful, too.

Cheers,
Walter

On Wed, Feb 24, 2010 at 12:31 PM, Walter McGinnis

On Thu, 2010-02-25 at 01:29 -0800, Mike C wrote:

Thanks for the replies. I’m using paperclip, but while search I still
can’t find out how to do this. I want to convert the image to jpg/png
ONLY if it’s a tiff image. I saw processors/callbacks in paperclip but
I haven’t found any way to make a Processor that can do this for me
since I don’t know how to call Imagemagick from ruby code. Would I
need Rmagick for this and how would it play in with paperclip?


I don’t worry about it because I simply convert everything to jpg.

Of course you have the complete paperclip code so you can see how it’s
doing things and modify it for your purposes.

Craig


This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

I have only tried to convert Tiff files using the free trial package of
another Tiff converter:

I am considering to employ one to help me. Do you have any good
suggestion?

Thanks for the replies. I’m using paperclip, but while search I still
can’t find out how to do this. I want to convert the image to jpg/png
ONLY if it’s a tiff image. I saw processors/callbacks in paperclip but
I haven’t found any way to make a Processor that can do this for me
since I don’t know how to call Imagemagick from ruby code. Would I
need Rmagick for this and how would it play in with paperclip?

On Nov 6, 2013, at 3:36 AM, arron w. wrote:

I have only tried to convert Tiff files using the free trial package of
another Tiff converter:
Implement Multi-page TIFF File Conversions in C# Programming
I am considering to employ one to help me. Do you have any good
suggestion?

Install imagemagick on your server. It’s free, and very powerful.
Converting a TIFF to another image format is as simple as this:

convert /path/to/image.tiff /path/to/output.jpg

Naturally, you can do almost anything and tweak almost anything, given
the right flags passed to the convert command. If imagemagick can’t open
or understand the file, it’s highly unlikely that it is an image at all.

Walter