Page 1 of 1

Not able to convert to tiff files (Pl, its Urgent for me)

Posted: 2009-08-21T21:12:44-07:00
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. ( Some times only) 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 User-forum

Surya Kiran.

Re: Not able to convert to tiff files (Pl, its Urgent for me)

Posted: 2009-08-21T21:29:34-07:00
by fmw42
What application are you using to display the tif?

have you tried dispaying it in IM

display 6.tif


What version of IM are you using? have you tried to upgrade to the current version.

What version of libtif and libjpg are you using?

Can you provide an example of your 6.jpg to see if there is any issues with it?

Re: Not able to convert to tiff files (Pl, its Urgent for me)

Posted: 2009-08-22T01:23:39-07:00
by smaruvada
I am using Windows Picture/ Fax Viewer. Micorsoft office Picutre Manger are the applicatoins i am using to display the files. I am copying the files to windows mechines and viewing them as i dont have any Unix Image veiwer available in our office environment.

7> display 6.tif
X connection to localhost:10.0 broken (explicit kill or server shutdown).
Need to find out this error.

8> convert -h
Version: ImageMagick 5.5.6 04/01/03 Q16 http://www.imagemagick.org

I am not sure of libjpg libtif versions how to find out them.

Re: Not able to convert to tiff files (Pl, its Urgent for me)

Posted: 2009-08-22T03:02:18-07:00
by fmw42
You are on a kind of old system. IM is now at 6.5.4-10 (so you are about 100 versions behind).

Perhaps just get all the latest delegates, install and also ugrade IM
http://dl.maptools.org/dl/libtiff/
http://en.wikipedia.org/wiki/Libjpeg

It could just be your windows viewer inability to view these consistently.

Still need a copy of 6.jpg to see if anyone has trouble converting it to tif!!!

Re: Not able to convert to tiff files (Pl, its Urgent for me)

Posted: 2009-08-23T21:50:10-07:00
by smaruvada
How can i attach the image (i.e 6.tif) here.

Surya Kiran.

Re: Not able to convert to tiff files (Pl, its Urgent for me)

Posted: 2009-08-23T22:02:22-07:00
by fmw42
you cannot upload a file. you have to host is somewhere else and post a link to that file