RGB to YXZ colorspace

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
cvisual

RGB to YXZ colorspace

Post by cvisual »

Hi
I´m newbie on this topics, and I need some help on this task...

I try to convert a RGB (Tiff16) to JPEG2000 XYZ. First I try just to convert Tiff16 RGB to Tiff16 XYZ (or another kind of file format. but in XYZ for further conversion to J2K).
The problem is when I do the conversion, the color change in a drastic way...
Can anyone help me on this issue?

Thanks in advance.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: RGB to YXZ colorspace

Post by fmw42 »

cvisual wrote:Hi
I´m newbie on this topics, and I need some help on this task...

I try to convert a RGB (Tiff16) to JPEG2000 XYZ. First I try just to convert Tiff16 RGB to Tiff16 XYZ (or another kind of file format. but in XYZ for further conversion to J2K).
The problem is when I do the conversion, the color change in a drastic way...
Can anyone help me on this issue?

Thanks in advance.
I do not think an XYZ image that is displayed will have meaningful looking colors as the XYZ channels are treated as if they were RGB when displaying unless your viewer is "smart" enough to properly interpret and convert XYZ channels.

Note that to convert to J2K, I think you must have the jasper delegate library installed. To check your delegate libraries that are installed,

convert -list configure

you should see something like

DELEGATES bzlib fontconfig freetype gs jpeg jp2 lcms lqr openexr png tiff x11 xml zlib

jp2 means J2K

Delegates are available at http://www.imagemagick.org/download/delegates/
cvisual

Re: RGB to YXZ colorspace

Post by cvisual »

First thanks fmw42 for your fast reply.

In fact I try the imageMagik's buit in viewer to display converted image.

I used this command to convert:
convert image.tif -set colorspace XYZ -colorspace XYZ image2.tif
I try this too on Toxic (a trial version from autodesk site) but the result its the same...
Even doing the conversion on toxic.
I think toxic maybe have to display it correctly (for a 5k euros piece of software...).

For J2k conversion I using openjpeg, ( image_to_j2k -ImgDir M:\Images -cinema2K 48 -OutFor J2K ) and its works nice, but I cant get figure if it works fine until goes to a Doremi Server to try it, and this is a little complicated to spend tests after tests (before I need to request a conversion to MXF J2K format before any try).
So The goal its see the final color before jump to J2k and MXF...

Thanks in advance

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

Re: RGB to YXZ colorspace

Post by fmw42 »

cvisual wrote:First thanks fmw42 for your fast reply.

In fact I try the imageMagik's buit in viewer to display converted image.

I used this command to convert:
convert image.tif -set colorspace XYZ -colorspace XYZ image2.tif
I try this too on Toxic (a trial version from autodesk site) but the result its the same...
Even doing the conversion on toxic.
I think toxic maybe have to display it correctly (for a 5k euros piece of software...).

For J2k conversion I using openjpeg, ( image_to_j2k -ImgDir M:\Images -cinema2K 48 -OutFor J2K ) and its works nice, but I cant get figure if it works fine until goes to a Doremi Server to try it, and this is a little complicated to spend tests after tests (before I need to request a conversion to MXF J2K format before any try).
So The goal its see the final color before jump to J2k and MXF...

Thanks in advance

Antonio
Try:

convert image.tif -colorspace XYZ image2.tif

I don't know or believe that -set colorspace XYZ is appropriate or will help.

As for your J2K issues, that is beyond me.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: RGB to YXZ colorspace

Post by anthony »

-set colorspace XYZ only changing the way Im will interpret the image data, the data itself is not changed.

-colorspace XYZ
changes the data into XYZ colorspace as well.

However how thi sis saved to TIF and interpreted by other programs is completely unknown, especially without the use of a color profile to declare the colorspace used within the image.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply