convert: improper image header @ error/pict.c/ReadPICTImage/

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
mech
Posts: 1
Joined: 2012-11-20T00:37:00-07:00
Authentication code: 6789

convert: improper image header @ error/pict.c/ReadPICTImage/

Post by mech »

Hi,

I have lots of old-skool PICT images in .pct format. I really need a way to convert them in a scripting environment. I am using Ruby to do it. All PICT files are in FileMaker database.

I try:

convert 8.pct 8.jpeg

And was given these:

convert: improper image header `/var/folders/dy/w38bs0kd7bbfw7b9pwggf1200000gn/T/magick-OU6IyVh9' @ error/pict.c/ReadPICTImage/871.

I heard that the PICT header is inconsistent depends on where you save it from, is that true?

I am using Mountain Lion, Ruby 1.9.3. ImageMagick 6.7.7-6 installed using Homebrew.

If you want the sample images, here are it:

http://dl.dropbox.com/u/6815194/8.pct
http://dl.dropbox.com/u/6815194/CAID40177.pct

Very thankful for anyone's help for this sort of legacy image format.

Thanks
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert: improper image header @ error/pict.c/ReadPICTIm

Post by fmw42 »

I think the issue may be that your PCT files are only supported in 32-bit architecture and not the current 64-bit ones.

I tried to open your 8.pct on my INTEL Mac OSX Snow Leopard in Preview and it said

Unsupported File Format

The PICT file format is not supported in 64-bit mode. Try selecting "Open in 32 Bit Mode" in the Finder's info window for Preview


So I followed instructions and changed Preview from 64-bit to open in 32-bit mode per the checkbox in the info window. Now I could open your PICT file in Preview and change it to some other format such as PNG. Then IM could display it.

At this point my suggestion would be to use Applescript on a MAC to convert all the PCT files to PNG.

I have no good workaround at this time.
Post Reply