Page 1 of 1

Scalling JPG to JP2 produces image that Quicktime can't disp

Posted: 2007-01-24T14:56:36-07:00
by msqr
Hello, I am using ImageMagick to try to scale a JPEG image into a JPEG 2000 (JP2) image.

I found that the JP2 result images seem to have something quirky in them that prevents QuickTime from displaying them properly, however other applications (such as display, or Photoshop) can display them fine.

When I say "can't display" what I mean is that QuickTime Player crashes (Mac or Windows), while the Preview application on OS X displays an image of the correct pixel dimensions but with the pixels all out of place, so the image looks like it's been sheared and the colors are off.

If I use convert to simply convert the image without scaling, QuickTime does not have any problem displaying the JP2 image.

Has anyone else seen this, or have any ideas what might cause this? The convert command I'm using is simply

convert 36855.jpg -scale 300x400 out-im.jp2

Posted: 2007-01-24T16:20:28-07:00
by magick
Try this command:
  • convert 36855.jpg -resize 300x400 -depth 8 out-im.jp2

Posted: 2007-01-24T16:33:34-07:00
by msqr
Yep, that did the trick, thanks very much for the help. Do you know why the -depth parameter is required here?