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

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
msqr

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

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

Try this command:
  • convert 36855.jpg -resize 300x400 -depth 8 out-im.jp2
msqr

Post by msqr »

Yep, that did the trick, thanks very much for the help. Do you know why the -depth parameter is required here?
Post Reply