'convert foo.jpg bar.j2c' fails

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
AndrewLinden

'convert foo.jpg bar.j2c' fails

Post 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)
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

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

Post 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/
AndrewLinden

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

Post 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.
Post Reply