Montage - Colorspace Questions

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?".
olafkarsten
Posts: 29
Joined: 2013-06-13T08:35:38-07:00
Authentication code: 6789

Re: Montage - Colorspace Questions

Post by olafkarsten »

Okay. Thanks again - very much. That issue drives me crazy these days.

It's a storck textile printer. (I'm not sure if its based on a mimaki model) I don't know the exact Model yet. I will try to get more information. But I'm afraid that needs until tomorrow.

We stripped the data and get some other numbers for the 8Bit files:

Code: Select all

$  convert im-lab-16bit-stripped.tif txt:
# ImageMagick pixel enumeration: 1,1,255,cielab
0,0: (255,0,0)  #FF0000  cielab(255,0,0)

Code: Select all

$  convert im-lab-8bit-stripped.tif txt:
# ImageMagick pixel enumeration: 1,1,255,cielab
0,0: (255,1,0)  #FF0100  cielab(255,1,0)
http://we.tl/BbuORbHuas The files, if someone need them.

Not sure if the histogram data from identify -verbose say something useful. But they are different:
for the 16bit:
Histogram:
1: (255,128,128) #FF8080 cielab(255,128,128)

for the 8bit:
Histogram:
1: (255,129,128) #FF8180 cielab(255,129,128)

We will explore that metadata/profile issue further: Maybe the printer uses Photoshop 8BIM data. Sounds odd to me, but it wouldn't be such a big surprise.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Montage - Colorspace Questions

Post by fmw42 »

txt is reporting 0-biased LAB values. Histogram and fx: and pixel: are reporting 50%-biased values. A but report was made for this. See viewtopic.php?f=3&t=25830. 8-bit results will not be as accurate as 16-bit results.
olafkarsten
Posts: 29
Joined: 2013-06-13T08:35:38-07:00
Authentication code: 6789

Re: Montage - Colorspace Questions

Post by olafkarsten »

I see, this is fixed now in beta from today. [edit: not fixed]

$ convert -size 1x1 xc:white -colorspace Lab txt:
# ImageMagick pixel enumeration: 1,1,65535,cielab
0,0: (99.9985%,0.0030518%,-0.00762951%) #FFFE00020000 cielab(99.9985%,0.0030518%,-0.00762951%)

$ convert -size 1x1 xc:white -colorspace Lab -depth 8 txt:
# ImageMagick pixel enumeration: 1,1,255,cielab
0,0: (100%,0.195315%,-0.196841%) #FF0000 cielab(100%,0.195315%,-0.196841%)

in the 50% notation 1/127 = 0.39% right? But it gives no fractions like 126,5 right? So the -0.19684% from the b chanel gets rounded (up?) and results in cielab(100,0,-1) ?

$ convert -size 1x1 xc:white -depth 8 -colorspace Lab txt:
# ImageMagick pixel enumeration: 1,1,255,cielab
0,0: (99.9985%,0.0030518%,-0.00762951%) #FF0000 cielab(99.9985%,0.0030518%,-0.00762951%)

So if we first convert to 8bit and than do the colorspace conversion the results seem better?
Last edited by olafkarsten on 2014-07-02T23:23:43-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Montage - Colorspace Questions

Post by fmw42 »

IM uses 50% biased values. So I am not sure it txt: is fixed or not. I don't think the zero biased values are not going to work correctly when used to define colors via xc: or canvas:.
olafkarsten
Posts: 29
Joined: 2013-06-13T08:35:38-07:00
Authentication code: 6789

Re: Montage - Colorspace Questions

Post by olafkarsten »

fmw42 wrote:IM uses 50% biased values. So I am not sure it txt: is fixed or not. I don't think the zero biased values are not going to work correctly when used to define colors via xc: or canvas:.
I think I didn't get the hold biased thing right :?

I tried the 50% biased values (i hope)

$ convert xc:"cielab(99.9985%,50.0038%,49.9931%)" txt:
# ImageMagick pixel enumeration: 1,1,65535,cielab
0,0: (99.9985%,0.0030518%,-0.00762951%) #FFFE00020000 cielab(99.9985%,0.0030518%,-0.00762951%)

$ convert xc:"cielab(99.9985%,50.0038%,49.9931%)" -depth 8 txt:
# ImageMagick pixel enumeration: 1,1,255,cielab
0,0: (100%,0.195315%,-0.196841%) #FF0000 cielab(100%,0.195315%,-0.196841%)

And if you do it with a real file - the numbers change again:
$ convert xc:"cielab(99.9985%,50.0038%,49.9931%)" -depth 8 white8.tif
$ convert white8.tif txt:
# ImageMagick pixel enumeration: 1,1,255,cielab
0,0: (100%,-0.0015259%,-0.393683%) #FF0000 cielab(100%,-0.0015259%,-0.393683%)

And cielab(100%,-0.0015259%,-0.393683%) - is not white anymore? Or?
olafkarsten
Posts: 29
Joined: 2013-06-13T08:35:38-07:00
Authentication code: 6789

Re: Montage - Colorspace Questions

Post by olafkarsten »

snibgo wrote:What type of printer is it?
Its an Stork inkjet textile printer Ruby V - based on Mimaki JV5. I have contacted the support people to help me with some question regarding the RIPSoftware. Waiting for more infos.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Montage - Colorspace Questions

Post by fmw42 »

see the bug report at viewtopic.php?f=3&t=25830
olafkarsten
Posts: 29
Joined: 2013-06-13T08:35:38-07:00
Authentication code: 6789

Re: Montage - Colorspace Questions

Post by olafkarsten »

fmw42 wrote:see the bug report at viewtopic.php?f=3&t=25830
This is fixed now. But it doesn't help to solve the issue. I think the explanation from GreenKoopa is right

viewtopic.php?f=1&t=23289&start=15#p97927

The issue is the convertion from 16bit to 8bit image.

Code: Select all

convert xc:"cielab(99.9985%,0.0030518%,-0.00762951%)" -colorspace Lab test.tif && convert test.tif -format "%[pixel:u.p{0,0}]" info:
cielab(99.9985%,50.0023%,49.9916%)

Code: Select all

convert xc:"cielab(99.9985%,0.0030518%,-0.00762951%)" -colorspace Lab -depth 8 test8bit.tif && convert test8bit.tif -format "%[pixel:u.p{0,0}]" info:
cielab(100%,49.9992%,49.6071%)
I think this should be fixed, but maybe I'm wrong again. Can someone of the more skilled ones correct me or confirm that it should be reported to the bug forum?

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

Re: Montage - Colorspace Questions

Post by fmw42 »

It does not seem correct that you start with unbiased values and end up with biased ones.

What happens if you start with biased values?
olafkarsten
Posts: 29
Joined: 2013-06-13T08:35:38-07:00
Authentication code: 6789

Re: Montage - Colorspace Questions

Post by olafkarsten »

fmw42 wrote:It does not seem correct that you start with unbiased values and end up with biased ones.

What happens if you start with biased values?
Okay, here are the results. I have updated to the last beta version. Seems the white issue is solved. Even the 8bit CIELab images now have correct white values.
But only if you use zero based values when defining the color in the command. The 50% biased notation gives weired results.

The txt: format returns zero based results. The -format "%[pixel:u.p{0,0}]" info: returns 50% biased values.

Results:

ImageMagick 6.8.9-7 Q16 x86_64 2014-07-30 http://www.imagemagick.org

Code: Select all

convert xc:"cielab(100%,50%,50%)" -colorspace Lab -format "%[pixel:u.p{0,0}]" info:
cielab(100%,100%,100%)
The Lab TIFF generated with biased values from the current IM version is red.

Code: Select all

convert xc:"cielab(100%,0%,0%)" -colorspace Lab -format "%[pixel:u.p{0,0}]" info:
cielab(100%,50.0008%,50.0008%)

Code: Select all

convert xc:"cielab(100%,0%,0%)" -colorspace Lab txt:
# ImageMagick pixel enumeration: 1,1,65535,cielab
0,0: (100%,0%,0%)  #FFFF00000000  cielab(100%,0%,0%)
you can even use non percent notation

Code: Select all

convert xc:"cielab(255,0,0)" -colorspace Lab txt:
# ImageMagick pixel enumeration: 1,1,65535,cielab
0,0: (100%,0%,0%)  #FFFF00000000  cielab(100%,0%,0%)
Post Reply