Error using 'convert' command on tiff files

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
uxlvr
Posts: 6
Joined: 2012-03-14T09:17:04-07:00
Authentication code: 8675308

Error using 'convert' command on tiff files

Post by uxlvr »

I get the following error while trying to use the 'convert' command:

$ convert source.tif -pointsize 36 -draw "text 50,50 'BANNER GOES HERE' " output.tif
Assertion failed: (toff_t)tif->tif_size==n, file tif_open.c, line 449
Abort(coredump)

The same command works fine with JPG or PNG formats. Greatly appreciate any help to resolve this issue. Please note that I have got ImageMagick-6.7.4.0 installed on HP-UX 11.31 ia64 from the binaries downloaded from http://hpux.connect.org.uk/hppd/hpux/X1 ... k-6.7.4.0/

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

Re: Error using 'convert' command on tiff files

Post by magick »

Notice the exception occurs inside the TIFF delegate library, not ImageMagick. Its possible there is a structure offset due to a different version of libTIFF being utilized verses the one that ImageMagick was built with.

Post a URL to your source.tif image. We'll see if we can reproduce the problem.
uxlvr
Posts: 6
Joined: 2012-03-14T09:17:04-07:00
Authentication code: 8675308

Re: Error using 'convert' command on tiff files

Post by uxlvr »

I can't provide a link to the source.tif file as I am inside a firewall.

I tried to upload to http://imgur.com/E3yK3 but it converted 'tif' to 'png'.

Is there any other way I can send you the file?

Thanks,
uxlvr
uxlvr
Posts: 6
Joined: 2012-03-14T09:17:04-07:00
Authentication code: 8675308

Re: Error using 'convert' command on tiff files

Post by uxlvr »

Here is the link to the source.tif file https://docs.google.com/open?id=0B_8fAT ... czBzbkRqZw
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Error using 'convert' command on tiff files

Post by fmw42 »

uxlvr wrote:Here is the link to the source.tif file https://docs.google.com/open?id=0B_8fAT ... czBzbkRqZw

It downloads as png for me and not tiff. You could try using dropbox.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Error using 'convert' command on tiff files

Post by magick »

Fred, choose File->Download. It downloads as TIF.

The file converted without complaint for us. We're using ImageMagick 6.7.6-0 and libTIFF 3.9.5.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Error using 'convert' command on tiff files

Post by fmw42 »

magick wrote:Fred, choose File->Download. It downloads as TIF.

The file converted without complaint for us. We're using ImageMagick 6.7.6-0 and libTIFF 3.9.5.

Thanks. Sorry I missed that. I thought I could just click on the image and select download. Each of these upload sites behaves differently and I missed looking under file as I had expected a more obvious download button or link.
uxlvr
Posts: 6
Joined: 2012-03-14T09:17:04-07:00
Authentication code: 8675308

Re: Error using 'convert' command on tiff files

Post by uxlvr »

Not sure where I can go from here.

Since our server is HPUX 11.31 ia64, I asked our unix admin to install all the required binaries (depot files) from http://hpux.connect.org.uk/hppd/hpux/X1 ... k-6.7.4.0/ and obviously, it doesn't work for converting/modifying tif files.

As it was pointed out that the issue could be with the libtiff library, I downloaded and compiled v3.9.5 locally (no depot files exist for v3.9.5) but was not able to test it. Is there a way I can tell 'convert' to use the local path instead of the system path?

Any suggestion would be of great help.
uxlvr
Posts: 6
Joined: 2012-03-14T09:17:04-07:00
Authentication code: 8675308

Re: Error using 'convert' command on tiff files

Post by uxlvr »

Hi magick, Would you please let me know if this worked in unix or windows platform? if it is unix, may I know what is OS you tested this?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Error using 'convert' command on tiff files

Post by fmw42 »

This works successfully for me on IM 6.7.6.0 Q16 Mac OSX Snow Leopard

convert source.tif -pointsize 36 -draw "text 50,50 'BANNER GOES HERE' " source_tmp.tif

Perhaps your libtif delegate library needs to be updated (and/or IM)
uxlvr
Posts: 6
Joined: 2012-03-14T09:17:04-07:00
Authentication code: 8675308

Re: Error using 'convert' command on tiff files

Post by uxlvr »

Fred, Thanks for the reply.

I have installed IM Version: ImageMagick 6.7.5-7 in my laptop (Windows 7) and the 'convert' command works fine without any issues.

For the unix server, first I requested the unix admin to download and install libtiff v4.0 (that was the only other depot file that was available for HPUX 11.31 ia64) but that didn't help. Then, I downloaded and built libtiff v3.9.5 locally, but can't figure out how to instruct 'convert' to look in my local path instead of '/usr/local/lib'. Unfortunately, I don't have root access and hence have to prove that the v3.9.5 libtiff libraries would actually work before requesting to install that in the system!!!

btw, I also noticed that when I try to open the 'source.tif' using 'display' command, it fails with the same error.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Error using 'convert' command on tiff files

Post by fmw42 »

It displays fine for me.

display source.tif

Also just so you know, my libtiff is

TIFF* TIFF rw+ Tagged Image File Format (LIBTIFF, Version 3.9.5)

Perhaps your server version of IM is not properly installed. You could try to have them uninstall and reinstall. If so, also reinstall libtiff.

Can you convert your image locally to some other format, upload it to your server and test to see if it has a problem. Then you might know if it is IM or libtiff.
Post Reply