pb with PICT image - not reading size correctly

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
blegay

pb with PICT image - not reading size correctly

Post by blegay »

Hi,

I have a picture in PICT format. OS X displays the file correctly and reports a size of 679x811.

When I tried convert the image was cropped (only top left part was converted).

Here is what identify reports :

Code: Select all

/Users/ble/ImageMagick/ImageMagick-6.5.3/bin/identify -verbose 264.PICT 
Image: 264.PICT
  Format: PICT (Apple Macintosh QuickDraw/PICT)
  Class: DirectClass
  Geometry: 162x194+0+0
  Resolution: 72x72
  Print size: 2.25x2.69444
  Units: Undefined
  Type: TrueColor
  Endianess: Undefined
  Colorspace: RGB
  Depth: 8-bit
  Channel depth:
    red: 8-bit
    green: 8-bit
    blue: 8-bit
  Channel statistics:
    red:
      min: 22 (0.0862745)
      max: 169 (0.662745)
      mean: 155.652 (0.6104)
      standard deviation: 16.5416 (0.0648692)
      kurtosis: 32.3986
      skewness: -5.70036
    green:
      min: 15 (0.0588235)
      max: 163 (0.639216)
      mean: 148.984 (0.584252)
      standard deviation: 18.2007 (0.0713751)
      kurtosis: 30.1863
      skewness: -5.49279
    blue:
      min: 5 (0.0196078)
      max: 154 (0.603922)
      mean: 135.998 (0.533326)
      standard deviation: 18.9471 (0.0743023)
      kurtosis: 28.2578
      skewness: -5.29539
  Image statistics:
    Overall:
      min: 5 (0.0196078)
      max: 169 (0.662745)
      mean: 110.159 (0.431995)
      standard deviation: 65.8475 (0.258225)
      kurtosis: -0.887637
      skewness: -1.01399
  Rendering intent: Undefined
  Interlace: None
  Background color: white
  Border color: rgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Page geometry: 162x194+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Undefined
  Orientation: Undefined
  Properties:
    create-date: 2009-07-01T10:18:03+02:00
    modify-date: 2009-07-01T10:07:22+02:00
    signature: f67b9ad9cdf8744f6d36493cb3c5cf7623aed88c70f25c22b0dada8768b58f54
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 1.572mb
  Number pixels: 30.7kb
  Version: ImageMagick 6.5.3-7 2009-06-14 Q16 OpenMP http://www.imagemagick.org
I opened the file with Preview (OS X image viewing tool) and saved in the same format (pict) as "264.pct"
It does report an error in the header but the file size is identified correctly...

Code: Select all

/Users/ble/ImageMagick/ImageMagick-6.5.3/bin/identify -verbose 264.pct
Image: 264.pct
  Format: PICT (Apple Macintosh QuickDraw/PICT)
  Class: DirectClass
  Geometry: 679x811+0+0
  Resolution: 72x72
  Print size: 9.43056x11.2639
  Units: Undefined
  Type: Bilevel
  Base type: Bilevel
  Endianess: Undefined
  Colorspace: RGB
  Depth: 8/1-bit
  Channel depth:
    gray: 1-bit
  Channel statistics:
    gray:
      min: 255 (1)
      max: 255 (1)
      mean: 255 (1)
      standard deviation: 0 (0)
      kurtosis: 0
      skewness: 0
  Histogram:
    550669: (255,255,255) #FFFFFF white
  Rendering intent: Undefined
  Interlace: None
  Background color: white
  Border color: rgb(223,223,223)
  Matte color: grey74
  Transparent color: black
  Page geometry: 679x811+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Undefined
  Orientation: Undefined
  Properties:
    create-date: 2009-07-01T14:29:51+02:00
    modify-date: 2009-07-01T14:29:51+02:00
    signature: 1c4c839534ae76dc5a742efd9ce0dfc575e555aa9ad398e033ba55ce24552a8d
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 2.129mb
  Number pixels: 538kb
  Version: ImageMagick 6.5.3-7 2009-06-14 Q16 OpenMP http://www.imagemagick.org
identify: Improper image header `/var/folders/oV/oVr2pPciF2eoUWyGKKIWRU+++TM/-Tmp-/magick-xANPJqW7' @ pict.c/ReadPICTImage/872.
Any idea ?

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

Re: pb with PICT image - not reading size correctly

Post by magick »

Post a URL to the image ImageMagick fails to read. We need to download it and inspect it to determine why it fails to process.
blegay

Re: pb with PICT image - not reading size correctly

Post by blegay »

Here is an URL of the original picture file...

http://www.rt2005-chauffage.com/pict/264.pct

The file will be deleted in few days...

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

Re: pb with PICT image - not reading size correctly

Post by fmw42 »

you never actually said what your exact convert command was. perhaps you are doing something incorrectly?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: pb with PICT image - not reading size correctly

Post by magick »

It appears to be a bug in the PICT reader. We will look for a patch for the problem within the next few days.
Post Reply