[magick-users] Problems handling certain jpgs.

Eddie Stuart eddie.stuart at googlemail.com
Thu Jan 4 05:50:45 CST 2007


Yup - the submitted photos are converted to PNG for processing as below.

Why would some PNGs have a zero-length profile after conversion?

Thanks,

Eddie

HoldFile = submitted file
WorkFile = converted PNG file
StopFile = final JPG file

    set img = Server.CreateObject("ImageMagickObject.MagickImage.1")
    result = img.Convert((MyPath & HoldFileName), WorkFile)
**  result = img.Convert("-resize", "150x150", WorkFile, WorkFile)
    result = img.Composite("-gravity", "NorthWest", NWcorner,
WorkFile, WorkFile)
    result = img.Composite("-gravity", "NorthEast", NEcorner,
WorkFile, WorkFile)
    result = img.Composite("-gravity", "SouthWest", SWcorner,
WorkFile, WorkFile)
    result = img.Composite("-gravity", "SouthEast", SEcorner,
WorkFile, StopFile)

** first image generates error on this line






On 1/4/07, omicronpersei8 at imagemagick.org <omicronpersei8 at imagemagick.org>
wrote:
>
> > convert: 450: unable to copy profile `invalid profile length'
>
> This message is thrown when reading a reading a PNG image with a
> zero-length
> profile.  Your original images are JPEG so you must be converting them to
> PNG somewhere because it does not appear possible the message could be
> generated from the JPEG reader.
>


More information about the Magick-users mailing list