Search found 43 matches

by tom_dl
2016-10-25T04:27:27-07:00
Forum: Users
Topic: Fast method of finding min(R,G,B)
Replies: 4
Views: 5165

Fast method of finding min(R,G,B)

I would like to find min(R,G,B) for an image. None of the -colorspace options provide this, so I've constructed a line to generate the desired results: convert input.png -separate \( -clone 0,1 -compose Darken -composite \) \( -clone 2,3 -compose Darken -composite \) -delete 0-3 output.png but it is...
by tom_dl
2016-04-24T05:55:50-07:00
Forum: Users
Topic: Converting to cielab with a specified illuminant
Replies: 14
Views: 14242

Re: Converting to cielab with a specified illuminant

I hadn't but just did, and it actually makes no difference. I also tried -black-point-compensation and the other intents, and always get exactly the same results. Should -intent change a cielab conversion (i.e. does the fact that it makes no difference imply it is a bug?)
by tom_dl
2016-04-23T16:27:39-07:00
Forum: Users
Topic: Converting to cielab with a specified illuminant
Replies: 14
Views: 14242

Re: Converting to cielab with a specified illuminant

For anyone interested, I have found the best way to achieve a D50 cielab conversion is to use cctiff (supplied as part of Argyll CMS). The following line makes the desired conversion: cctiff -t1 -ir -p sRGB.icm input.tif output.tif When I run convert output.tif txt: the values are the same as Photos...
by tom_dl
2016-04-17T16:29:09-07:00
Forum: Users
Topic: Converting to cielab with a specified illuminant
Replies: 14
Views: 14242

Re: Converting to cielab with a specified illuminant

Further investigation has allowed me to achieve success with the L* component, but not the a or b components. To apply the matrix, you must convert to XYZ space first: convert in.tif -colorspace xyz -color-matrix \ "1.047886003 0.022918765 -0.050216095 \ 0.029581782 0.990483518 -0.017078708 \ -...
by tom_dl
2016-04-14T09:10:15-07:00
Forum: Users
Topic: Converting to cielab with a specified illuminant
Replies: 14
Views: 14242

Re: Converting to cielab with a specified illuminant

I tried this matrix and interchanging rows and columns. However, I didn't get the same results as Lindbloom's calculator, or Photoshop's D50 conversion. Can anyone else test this and verify? Is a color matrix just not the right way to do this, or am I missing something? Again, I very much appreciate...
by tom_dl
2016-04-12T07:01:35-07:00
Forum: Users
Topic: Converting to cielab with a specified illuminant
Replies: 14
Views: 14242

Re: Converting to cielab with a specified illuminant

I believe the functionality I am looking for is a chromatic adaptation transform. LCMS is capable of this, so I can't see it would be a lot of work to implement.
by tom_dl
2016-04-12T03:31:11-07:00
Forum: Users
Topic: Converting to cielab with a specified illuminant
Replies: 14
Views: 14242

Re: Converting to cielab with a specified illuminant

Thanks very much for your answer. Using profiles seems like a good possible workaround for now. I'm guessing this may be a feature request if not present.
by tom_dl
2016-04-12T03:29:19-07:00
Forum: Bugs
Topic: Lab color behaves incorrectly
Replies: 12
Views: 7284

Re: Lab color behaves incorrectly

I get:

Code: Select all

convert xc:"cielab(10,-100,-25)" txt:
# ImageMagick pixel enumeration: 1,1,65535,cielab
0,0: (2570,0,0)  #0A0A00000000  cielab(4%,0%,0%)
by tom_dl
2016-04-11T15:49:24-07:00
Forum: Bugs
Topic: Lab color behaves incorrectly
Replies: 12
Views: 7284

Re: Lab color behaves incorrectly

Thanks both for looking into this and confirming the bug.
Tom
by tom_dl
2016-04-11T15:04:28-07:00
Forum: Users
Topic: Converting to cielab with a specified illuminant
Replies: 14
Views: 14242

Converting to cielab with a specified illuminant

Imagemagick sensibly converts RGB to Lab using a reference white illuminant of D65. Adobe Photoshop converts RGB to Lab using a reference white illuminant of D50. I can see this must be the case having done several conversions while following along with Bruce Lindbloom's excellent calculator. How mi...
by tom_dl
2016-04-11T13:57:45-07:00
Forum: Bugs
Topic: Lab color behaves incorrectly
Replies: 12
Views: 7284

Re: Lab color behaves incorrectly

I assume you are using a build of ImageMagick with HDRI enabled? When I copy your command with it enabled, I do get the same results. However, my bug report was for builds without HDRI enabled. When I copy your command without HDRI, I get: convert xc:cielab(4%,-40%,-10%) txt: # ImageMagick pixel enu...
by tom_dl
2016-04-11T10:53:55-07:00
Forum: Bugs
Topic: Lab color behaves incorrectly
Replies: 12
Views: 7284

Lab color behaves incorrectly

Version: ImageMagick 6.9.3-7 Q16 x64 2016-04-11 I am convinced ImageMagick's text output of Lab is wrong. I've tried this in Q8, Q16 and Q32 versions, without HDRI: convert -size 1x1 xc:"cielab(L,a,b)" output.txt where L,a,b are any 3 numbers. If entered as % L is clipped at 0% and 100% -...
by tom_dl
2015-11-10T04:32:07-07:00
Forum: Users
Topic: Analyze only opaque pixels
Replies: 2
Views: 3028

Re: Analyze only opaque pixels

I didn't realise the -scale operator ignored all transparent values. That's really helpful. Thanks!
by tom_dl
2015-11-09T11:32:31-07:00
Forum: Users
Topic: Analyze only opaque pixels
Replies: 2
Views: 3028

Analyze only opaque pixels

Hi, I'm running IM 6.9.0-10 Q16 x64. I have an image where I'd like to analyze a certain portion of the image. The portion is an irregular shape, so I cannot crop to the portion. I have decided to make all other pixels transparent, but -format "%[mean]" info: doesn't care - it still analyz...
by tom_dl
2015-05-14T04:44:56-07:00
Forum: Users
Topic: Making a new 16-bit Lab color
Replies: 5
Views: 4742

Re: Making a new 16-bit Lab color

I'm not in HDRI. When I do convert -version, I get this: $ convert -version Version: ImageMagick 6.9.0-10 Q16 x64 2015-02-28 http://www.imagemagick.org Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC License: http://www.imagemagick.org/script/license.php Features: DPC Modules OpenMP Delega...