Improper image header
-
- Posts: 30
- Joined: 2009-01-02T14:14:45-07:00
- Location: Minneapolis, MN
Improper image header
When attempting to convert a pct created by Quicktime 7 Pro, I get
$ convert frame1.pct frame1.jpg
convert: Improper image header `/var/folders/rJ/rJLQE-4XEXqyGP5Q9Q4Mg++++TM/-Tmp-/magick-c9ZU3eZU' @ pict.c/ReadPICTImage/871.
Running Snow Leopard on a MacBook Pro.
I can open the pct file in Photoshop and in 32 bit mode in Preview.
Any ideas?
Thanks!!
$ convert frame1.pct frame1.jpg
convert: Improper image header `/var/folders/rJ/rJLQE-4XEXqyGP5Q9Q4Mg++++TM/-Tmp-/magick-c9ZU3eZU' @ pict.c/ReadPICTImage/871.
Running Snow Leopard on a MacBook Pro.
I can open the pct file in Photoshop and in 32 bit mode in Preview.
Any ideas?
Thanks!!
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Improper image header
That type of error is caused by a failure of the 'delegate' program IM used to convert the image.
More than likely the delegate program ran, but produced a empty or 'unrecognised' output file
More than likely the delegate program ran, but produced a empty or 'unrecognised' output file
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Improper image header
Post a URL to your image here. We need to download it and reproduce the problem before we can offer a solution.
-
- Posts: 30
- Joined: 2009-01-02T14:14:45-07:00
- Location: Minneapolis, MN
Re: Improper image header
http://clients.clockwork.net/imagemagick/frame1.pctmagick wrote:Post a URL to your image here. We need to download it and reproduce the problem before we can offer a solution.
Thanks!
-
- Posts: 30
- Joined: 2009-01-02T14:14:45-07:00
- Location: Minneapolis, MN
Re: Improper image header
Accessing the image seems to be a problem. I'll repost when I figure out what's wrong with the URL.jeffATwork wrote:http://clients.clockwork.net/imagemagick/frame1.pctmagick wrote:Post a URL to your image here. We need to download it and reproduce the problem before we can offer a solution.
Thanks!
-
- Posts: 30
- Joined: 2009-01-02T14:14:45-07:00
- Location: Minneapolis, MN
Re: Improper image header
The file's there. I was testing accessibility with Safari which got upset about server certification and couldn't download. Use wget or something.jeffATwork wrote:Accessing the image seems to be a problem. I'll repost when I figure out what's wrong with the URL.jeffATwork wrote:http://clients.clockwork.net/imagemagick/frame1.pctmagick wrote:Post a URL to your image here. We need to download it and reproduce the problem before we can offer a solution.
Thanks!
Re: Improper image header
We downed loaded the file. There is no readily apparent reason why ImageMagick cannot read the image. It will take some serious debugging to fix the problem. We currently do not have an ETA on when you can expect a patch.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Improper image header
I don't know if this will be helpful or not. I am on Mac OSX Tiger. I used GraphicConverter to create a pict image in QT format and had no problem using IM to convert it to jpg. Sorry I don't have QT Pro to test.
However, using Preview v3.09 to save to PICT and then using IM to convert to jpg, I get the following error
convert zelda4.pict zelda4_pict.jpg
convert: Improper image header `/var/tmp/magick-OtLYrHQr' @ pict.c/ReadPICTImage/871.
convert -version
Version: ImageMagick 6.5.7-4 2009-11-03 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
Here are 3 files, first two from GraphicConverter, convert fine with IM. Last one from Preview, does not convert with IM
http://www.fmwconcepts.com/misc_tests/z ... _noweb.pct
http://www.fmwconcepts.com/misc_tests/z ... qt_web.pct
http://www.fmwconcepts.com/misc_tests/z ... review.pct
However, using Preview v3.09 to save to PICT and then using IM to convert to jpg, I get the following error
convert zelda4.pict zelda4_pict.jpg
convert: Improper image header `/var/tmp/magick-OtLYrHQr' @ pict.c/ReadPICTImage/871.
convert -version
Version: ImageMagick 6.5.7-4 2009-11-03 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
Here are 3 files, first two from GraphicConverter, convert fine with IM. Last one from Preview, does not convert with IM
http://www.fmwconcepts.com/misc_tests/z ... _noweb.pct
http://www.fmwconcepts.com/misc_tests/z ... qt_web.pct
http://www.fmwconcepts.com/misc_tests/z ... review.pct
-
- Posts: 30
- Joined: 2009-01-02T14:14:45-07:00
- Location: Minneapolis, MN
Re: Improper image header
OK.magick wrote:We downed loaded the file. There is no readily apparent reason why ImageMagick cannot read the image. It will take some serious debugging to fix the problem. We currently do not have an ETA on when you can expect a patch.
I just verified that GraphicConverter is able to handle the PICT. So I'll go that route.
Thanks for trying it out.
-
- Posts: 30
- Joined: 2009-01-02T14:14:45-07:00
- Location: Minneapolis, MN
Re: Improper image header
Yep. That looks like the Tiger version of my problem on Snow Leopard. So, it's been around for a while.fmw42 wrote:I don't know if this will be helpful or not. I am on Mac OSX Tiger. I used GraphicConverter to create a pict image in QT format and had no problem using IM to convert it to jpg. Sorry I don't have QT Pro to test.
However, using Preview v3.09 to save to PICT and then using IM to convert to jpg, I get the following error
convert zelda4.pict zelda4_pict.jpg
convert: Improper image header `/var/tmp/magick-OtLYrHQr' @ pict.c/ReadPICTImage/871.
convert -version
Version: ImageMagick 6.5.7-4 2009-11-03 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
Here are 3 files, first two from GraphicConverter, convert fine with IM. Last one from Preview, does not convert with IM
http://www.fmwconcepts.com/misc_tests/z ... _noweb.pct
http://www.fmwconcepts.com/misc_tests/z ... qt_web.pct
http://www.fmwconcepts.com/misc_tests/z ... review.pct
Thanks for giving it a shot!
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Improper image header
Apple must have changed something in the QT format for PICT at some point as GraphicConverter works fine to produce a PICT that IM can convert.
Re: Improper image header
I spent some time today debugging a problem of this type. I downloaded and compiled the ImageMagick code so I could add some debug prints to the PICT converter. It looks like my file contained an embedded image, opcode 0x8200. According to coders/pict.c this is an "embedded JPEG", but according to the Apple docs it is "Compressed QuickTime":
http://developer.apple.com/legacy/mac/l ... w-458.html
I then reviewed the QuickTime Image File doc, available here:
http://developer.apple.com/mac/library/ ... -TPXREF101
From that information and some binary dumps I was able to discover that the QuickTime was encapsulating a TIFF image. So this is 1) a TIFF, inside 2) a QuickTime Image, inside 3) a PICT file.
The existing code in pict.c for handling opcode 0x8200 seems to be hardcoded to expect an embedded JPEG, but judging from the Apple docs it can be much more general.
http://developer.apple.com/legacy/mac/l ... w-458.html
I then reviewed the QuickTime Image File doc, available here:
http://developer.apple.com/mac/library/ ... -TPXREF101
From that information and some binary dumps I was able to discover that the QuickTime was encapsulating a TIFF image. So this is 1) a TIFF, inside 2) a QuickTime Image, inside 3) a PICT file.
The existing code in pict.c for handling opcode 0x8200 seems to be hardcoded to expect an embedded JPEG, but judging from the Apple docs it can be much more general.
Re: Improper image header
Of the three .pct files posted by fmw42, the first two are embedded JPEGs, which explains why ImageMagick can read them OK. The third one seems to be gone, so I can't check it...
Re: Improper image header
I'm having similar issues with ImageMagick v. 6.7.3-1 Q17 on OS/X Lion.
Here are three files that Preview reads correctly, but ImageMagick dies on with the aforementioned error:
http://dl.dropbox.com/u/2737199/bugs/Im ... k/xdd.pict
http://dl.dropbox.com/u/2737199/bugs/Im ... k/xad.pict
http://dl.dropbox.com/u/2737199/bugs/Im ... k/xdc.pict
Here are three files that Preview reads correctly, but ImageMagick dies on with the aforementioned error:
http://dl.dropbox.com/u/2737199/bugs/Im ... k/xdd.pict
http://dl.dropbox.com/u/2737199/bugs/Im ... k/xad.pict
http://dl.dropbox.com/u/2737199/bugs/Im ... k/xdc.pict
Code: Select all
lappy-i7:ImageMagick clint$ ls
xad.pict xdc.pict xdd.pict
lappy-i7:ImageMagick clint$ mogrify -format png *.pict
mogrify: improper image header `xad.pict' @ error/pict.c/ReadPICTImage/871.
mogrify: improper image header `xdc.pict' @ error/pict.c/ReadPICTImage/868.
mogrify: improper image header `xdd.pict' @ error/pict.c/ReadPICTImage/868.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Improper image header
For what it is worth. I am on IM 6.7.3.6 Q16 Mac OSX Tiger. I get the following from IM
identify xdd.pict
identify: improper image header `xdd.pict' @ error/pict.c/ReadPICTImage/868.
Preview gives an error message saying it is corrupt.
BUT GraphicConverter opens it fine! If I resave it from GraphicConverter as PICT, then Preview can open it and IM can handle it fine.
So I would say that your image was not created according to Apple's pict standards in some way or the format has changed over time.
identify xdd.pict
identify: improper image header `xdd.pict' @ error/pict.c/ReadPICTImage/868.
Preview gives an error message saying it is corrupt.
BUT GraphicConverter opens it fine! If I resave it from GraphicConverter as PICT, then Preview can open it and IM can handle it fine.
So I would say that your image was not created according to Apple's pict standards in some way or the format has changed over time.