Not able to convert to tiff files

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
smaruvada

Not able to convert to tiff files

Post by smaruvada »

Requirement : My requirement is to convert bmp,jpg,gif files to tiff files.
I have two options to do this
A. Doing it from Shell Script.
B. Doing it through batch ( i.e C++ Program) or

A. Doing it from Shell Script

1. I tried to an extent successful by doing this using scripts ( calling /usr/bin/convert). The issues I faced with this were
a)It did not give me direct convertion from Jpg to tif. ( Not all the times) I had to convert Jpg to gif and gif to tif . Is there any work around for this ?
for eg : > convert -size 120x120 6.jpg 6.tif
a new file is created with the 6.tif name but, I was not able to view the 6.tif . I am getting “No Preview available” Message.
Where as I am able to convert the same file.
> convert -size 120x120 6.jpg 6.gif
> convert -size 120x120 6.gif 6.tif
I am able to open the file 6.tif perfectly.

b) As you in the first case also it is not throwing any error. Is there any way to catch this.? if i have an error i can cath that and handle accordingly in my shell scrpt


B. Doing it through batch ( i.e C++ Program)
Can I use ImageMagic’s C++ API in my batch program. I know Magic++ has a library, And i downloaded ImageMagic++ suite
I have got lot of utilities like convert.c. but i am not able to use them.
Can any one share some sample programs for the same.


Thanks in advance, Hope my explanation is clear.
I have tried , all possiblities, and as my last option i am trying with the Imagemagick Develper-forum

Surya Kiran.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Not able to convert to tiff files

Post by magick »

Did you verify you have support for TIFF in your instance of ImageMagick? Type
  • identify -list tiff
Did you get this line:
  • TIFF* TIFF rw+ Tagged Image File Format (LIBTIFF, Version 3.9.0)
The rw mode means ImageMagick is prepared to read and write TIFF images. If not you need to install the TIFF library and its development headers and rebuild ImageMagick until it reports the line above.
Post Reply