irregular channel geometry error/missing image channel

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Post Reply
jkimble
Posts: 12
Joined: 2012-05-04T10:45:03-07:00
Authentication code: 13

irregular channel geometry error/missing image channel

Post by jkimble » 2012-05-09T05:08:31-07:00

Just doing: "convert test_image1.jp2 test_image1.png"

I'm trying to convert a 1920x540 j2k or jp2 formatted file to ANYTHING else and I keep getting these errors. The j2k version of the file gives the "irregular channel geometry" error and the jp2 file (same file with a header) gives the "missing image channel" error. I can't find a clue as to what this means. I'm able to open both of these files with multiple viewers (kakadu, jiv, irfanview) without a problem so they're not invalid images.

Can anyone give me some idea of what's going on here? What can I do to correct it?

Thanks!

el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: irregular channel geometry error/missing image channel

Post by el_supremo » 2012-05-09T08:01:19-07:00

I've converted a couple of jp2 files to png without any errors. Can you post a link to one of the jp2 files which fails?

Pete
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.

jkimble
Posts: 12
Joined: 2012-05-04T10:45:03-07:00
Authentication code: 13

Re: irregular channel geometry error/missing image channel

Post by jkimble » 2012-05-09T10:29:34-07:00

I don't have a common place I can point you to. Is there some other way? Can I email them to you?

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

Re: irregular channel geometry error/missing image channel

Post by fmw42 » 2012-05-09T10:36:50-07:00

jkimble wrote:I don't have a common place I can point you to. Is there some other way? Can I email them to you?
FYI, you can find many free image hosting web sites online (such as dropbox). Just upload your image to one of them and then put a link to the page on this forum.

jkimble
Posts: 12
Joined: 2012-05-04T10:45:03-07:00
Authentication code: 13

Re: irregular channel geometry error/missing image channel

Post by jkimble » 2012-05-09T11:19:44-07:00

The place I'm working blocks sites like that for security reasons...

jkimble
Posts: 12
Joined: 2012-05-04T10:45:03-07:00
Authentication code: 13

Re: irregular channel geometry error/missing image channel

Post by jkimble » 2012-05-09T19:26:36-07:00

I've attached the files that give the "irregular channel geometry not supported" message. They are 1920x540 HD images encoded by a pair of ADV212 jpeg encoders (Y and CrCb) that were merged for color. Jiv and kakadu have no problem displaying these images.

The REAL problem I'm trying to solve is joining two of these images together to create a single 1920x1080 image that can then be combined with others to create an MJ2 video. If I can get the ImageMagick libs to work with this type of image I can do just about anything with it. Unfortunately I can't seem to get past this issue.

Any help I can get would be VERY much appreciated.

Thanks,

James

The links are:
http://dl.dropbox.com/u/78565986/test_00000.j2k
http://dl.dropbox.com/u/78565986/test_00001.j2k

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

Re: irregular channel geometry error/missing image channel

Post by fmw42 » 2012-05-09T19:31:41-07:00

I don't know that IM know about j2k images. It uses jp2 images from the Jasper delegate library (at least on unix machines). This was a problem discussed in the last week or two on one of the other forums.

Does

convert -list format

show j2k? On my Mac, it only shows:

J2C* JP2 rw- JPEG-2000 Code Stream Syntax
JNG* PNG rw- JPEG Network Graphics
See http://www.libpng.org/pub/mng/ for details about the JNG
format.
JP2* JP2 rw- JPEG-2000 File Format Syntax
JPC* JP2 rw- JPEG-2000 Code Stream Syntax
JPEG* JPEG rw- Joint Photographic Experts Group JFIF format (80)
JPG* JPEG rw- Joint Photographic Experts Group JFIF format (80)
JPX* JP2 rw- JPEG-2000 File Format Syntax

Note I am not an expert on JP2000 as I rarely use it.

jkimble
Posts: 12
Joined: 2012-05-04T10:45:03-07:00
Authentication code: 13

Re: irregular channel geometry error/missing image channel

Post by jkimble » 2012-05-09T19:54:20-07:00

Yes, IM doesn't list j2k as a suported format. Hower J2K (and JPC and J2C for that matter) are just JP2 w/o a header. Really kinda suprises me it doesn't handle J2K in the same way it would handle J2C (which it does list as supported). I changed the extention to j2c and got the same result.

I added the header to these and got the message "convert: missing image channel". I can put the jp2's up for review tomorrow. I don't have a copy of them where I'm at now.

James

jkimble
Posts: 12
Joined: 2012-05-04T10:45:03-07:00
Authentication code: 13

Re: irregular channel geometry error/missing image channel

Post by jkimble » 2012-05-09T19:58:54-07:00

"Note I am not an expert on JP2000 as I rarely use it."

I just noticed this at the bottom of your post and had to laugh. I've been working with JPEG 2000 for about 6 weeks now and it seems there are no experts. Pasting two images together to create a new image would take about 10 minutes in any normal format. Kills me that my project has to involve this poorly documented and poorly supported standard! Does ANYONE use it!

Anyway, I appreciate you trying to help though.

James

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

Re: irregular channel geometry error/missing image channel

Post by fmw42 » 2012-05-09T19:59:34-07:00

when you run

convert -list configure

does the line starting with DELEGATES list jp2. If not then perhaps the Jasper delegate library is missing and needs to be installed. At least that would be the case on unix. I do not know about windows.

jkimble
Posts: 12
Joined: 2012-05-04T10:45:03-07:00
Authentication code: 13

Re: irregular channel geometry error/missing image channel

Post by jkimble » 2012-05-09T20:16:12-07:00

Yes, it lists:

DELEGATES bzlib djvu fontconfig freetype gs jpeg jng jp2 lcms openexr png rsvg tiff x11 xml wmf zlib

I was able to use jasper to convert these j2k's to jp2's. They can be seen at:

http://dl.dropbox.com/u/78565986/test0.jp2
http://dl.dropbox.com/u/78565986/test1.jp2

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

Re: irregular channel geometry error/missing image channel

Post by fmw42 » 2012-05-09T21:12:16-07:00

Probably should report your issue to the Developers forum regarding IM recognizing j2k and perhaps to the Bugs forum about using IM to convert your image using Jasper to png.

After converting to jp2, does IM still report an error when trying to convert to png? what about to gif? using command line.


Both of these fail for me with your same error message on my IM 6.7.6.9 Q16 Mac OSX Snow Leopard

convert test0.jp2 test0a.png

convert JP2:test0.jp2 test0b.png

convert: irregular channel geometry not supported `test0.jp2' @ error/jp2.c/ReadJP2Image/489.

Same when just trying to display

display test0.jp2

But Mac Preview and GraphicConverter and Safari opens it fine.

jkimble
Posts: 12
Joined: 2012-05-04T10:45:03-07:00
Authentication code: 13

Re: irregular channel geometry error/missing image channel

Post by jkimble » 2012-05-10T10:03:37-07:00

Yes, that's exactly what it does for me (with Jiv and Display).

It's interesting to note that, because I'm using several different viewers (Kakado, IrfanView, display (IM), jiv (Jasper) and FastStone Image Viewer) I get completely different results (meaning they implement the standard in different ways in each) for each. In this case jiv and display fail, kakadu displays with the wrong color, IrfanView and FastStone render it correctly.

I've got a really sick feeling in my stomach about this "standard"...

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

Re: irregular channel geometry error/missing image channel

Post by fmw42 » 2012-05-10T10:20:20-07:00

I would report these issue. Report the missing j2k to the Developers forum and the error message on the Bugs forum.

You might also search the archives for j2k and see what other interesting topics have been presented. There are others. Perhaps they will give you some clue.

Post Reply