Is is possible to get jpeg2000 from ImageToBlob?

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
robertraiz
Posts: 11
Joined: 2014-02-04T01:40:44-07:00
Authentication code: 6789

Is is possible to get jpeg2000 from ImageToBlob?

Post by robertraiz »

Hello all,
I have a script which takes png8/32 files and crops them to a fixed width and height and then uses ImageToBlob.
The problem is that I would need to get and end result with a jp2 file as I get a smaller size of the same file.

Is it possbile to use ImageToBlob(magick=>'jp2')? I tried but with no luck.
robertraiz
Posts: 11
Joined: 2014-02-04T01:40:44-07:00
Authentication code: 6789

Re: Is is possible to get jpeg2000 from ImageToBlob?

Post by robertraiz »

If this is not possible I would also need some insight in how to make my png8 files smaller...maybe? The only attribute that I am sending to ImageToBlob is magick -> png and quality-> 90
I am not sure if I could use some compression or something similar.

I appreciate any advice.
robertraiz
Posts: 11
Joined: 2014-02-04T01:40:44-07:00
Authentication code: 6789

Re: Is is possible to get jpeg2000 from ImageToBlob?

Post by robertraiz »

Hello,
I am still trying to use:

Code: Select all

 ImageToBlob(magick=>'jp2')
but with no luck.

I have a png file and I want to obtain the jpeg 2000 format from the script.
The error is an empty file."

Can someone please tell me how is the correct syntax that should be used?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Is is possible to get jpeg2000 from ImageToBlob?

Post by magick »

Type
  • convert -list format
Is JP2 listed as supported?
  • JP2* JP2 rw- JPEG-2000 File Format Syntax (2.0.0)
If so, ImageMagick can read and write JPEG2000 images, including with ImageToBlob().
robertraiz
Posts: 11
Joined: 2014-02-04T01:40:44-07:00
Authentication code: 6789

Re: Is is possible to get jpeg2000 from ImageToBlob?

Post by robertraiz »

Hello,

I think you have solved my issue. I do not have the format listed.
I will try to install the support.

The thing is, that equery u shows that the support for jpeg 2000 is active. (through DCM* maybe )
robertraiz
Posts: 11
Joined: 2014-02-04T01:40:44-07:00
Authentication code: 6789

Re: Is is possible to get jpeg2000 from ImageToBlob?

Post by robertraiz »

Unfortunately I did not manage to install the support for it.

if I run indentify on my jp2 image, I get:

Code: Select all

test.jp2 PNG 300x300 3000x3000+600+900 8-bit sRGB 6.69KB 0.000u 0:00.000
I just ran

Code: Select all

convert test.png test.jp2
Is it possible the conversion is not ok?
Post Reply