Page 1 of 1

'convert foo.jpg bar.j2c' fails

Posted: 2008-10-17T14:51:14-07:00
by AndrewLinden
I searched this bug forum and did not find any mention of this bug so I figured I would mention it. When I run the following command I don't get an error, however the conversion does not happen -- the resulting file is still JPEG:

Code: Select all

    $ convert foo.jpg bar.j2c
When I run 'identify bar.j2c' I find that it is a JPEG image. Also fails for PNG, MIFF, and BMP images. Didn't try any others.

I also can't create a fresh j2c image using ImageMagick. For instance, the following command fails:

Code: Select all

    $ convert -size 256x256 xc:white  canvas_white.j2c
    convert: no encode delegate for this image format `canvas_white.j2c'.
However, I can take an original j2c image and make it white:

Code: Select all

    $ convert -white-threshold 0 foo.j2c bar.j2c
The new file bar.j2c will correctly be j2c, and will be all white.

The fact that ImageMagick can write out a white j2c file in one case, but not the other must be a bug.

My specs:

ImageMagick 6.3.7
Ubuntu 8.04

(Also busted on custom build of ImageMagick 6.4.4)

Re: 'convert foo.jpg bar.j2c' fails

Posted: 2008-10-17T20:19:08-07:00
by fmw42
AndrewLinden wrote:I searched this bug forum and did not find any mention of this bug so I figured I would mention it. When I run the following command I don't get an error, however the conversion does not happen -- the resulting file is still JPEG:

Code: Select all

    $ convert foo.jpg bar.j2c
When I run 'identify bar.j2c' I find that it is a JPEG image. Also fails for PNG, MIFF, and BMP images. Didn't try any others.

I also can't create a fresh j2c image using ImageMagick. For instance, the following command fails:

Code: Select all

    $ convert -size 256x256 xc:white  canvas_white.j2c
    convert: no encode delegate for this image format `canvas_white.j2c'.
However, I can take an original j2c image and make it white:

Code: Select all

    $ convert -white-threshold 0 foo.j2c bar.j2c
The new file bar.j2c will correctly be j2c, and will be all white.

The fact that ImageMagick can write out a white j2c file in one case, but not the other must be a bug.

My specs:

ImageMagick 6.3.7
Ubuntu 8.04

(Also busted on custom build of ImageMagick 6.4.4)
What format is .j2c? I do not see it listed when running

convert -list format

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* JPC rw- JPEG-2000 Code Stream Syntax
JPEG* JPEG rw- Joint Photographic Experts Group JFIF format (62)
JPG* JPEG rw- Joint Photographic Experts Group JFIF format
JPX* JPX rw- JPEG-2000 File Format Syntax


Do you mean jp2? If so, that is JPEG2000 and needs the jasper library. See

http://www.imagemagick.org/Usage/formats/#jpg

http://www.imagemagick.org/download/delegates/

Re: 'convert foo.jpg bar.j2c' fails

Posted: 2008-10-18T07:34:03-07:00
by AndrewLinden
D'oh! You're right. There is no J2C format! It is actually JPC that I'm thinking about. This command works as expected:

Code: Select all

$ convert -size 256x256 xc:white  canvas_white.jpc
The original images I was trying to play with end in in j2c but I realized now that is not the standard extension. Pebcak!

Thank you.