[SOLVED] convert from sRGB to linear RGB

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?".
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: convert from sRGB to linear RGB

Post by NicolasRobidoux »

Code: Select all

magick curios.tif -colorspace RGB -filter Box -resize 35x23 -colorspace sRGB curios1.tif
magick curios.tif -set colorspace sRGB -colorspace RGB curiosRGB.ppm
magick curiosRGB.ppm -filter Box -resize 35x23 curiosSMALL.ppm
magick curiosSMALL.ppm -set colorspace RGB -colorspace sRGB curios2.tif
which is somewhat representative of what I use this new feature for, gives a maxabs difference of 4, which in 16-bit is totally expected.
Hurray!
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: convert from sRGB to linear RGB

Post by NicolasRobidoux »

fmw42 wrote:Is this change only for IM 7 or also for IM 6.
Fred: Per Changelog (and parallel list of files updated by svn up), it's IM6 too.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert from sRGB to linear RGB

Post by fmw42 »

NicolasRobidoux wrote:
fmw42 wrote:Is this change only for IM 7 or also for IM 6.
Fred: Per Changelog (and parallel list of files updated by svn up), it's IM6 too.
Then I presume it will show up in IM 6.7.7.10 (beta) and eventually the IM 6 changelog. I have not yet downloaded the beta as I did not know whether it would be there.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: [SOLVED] convert from sRGB to linear RGB

Post by anthony »

A bit off topic... but may be useful...

You cat get the changelog changes for the SVN
svn diff -r HEAD ChangeLog

HEAD -- the main svn repository
BASE -- you last download from repository
number -- a specific number


I often use "diffuse" as a file difference viewer, as it will accept a SVN '-r' parameter instead of one of the two file you wish to compare. EG:
diffuse -r HEAD ChangeLog
If only one file is present it compares against your last download (BASE) so you can check the changes you made.
Very useful for programmers. :-)
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: [SOLVED] convert from sRGB to linear RGB

Post by NicolasRobidoux »

Cristy: My student Adam Turcotte immediately put the conversion bit in the code he's running for his thesis (with an ETA in 13 days).
Again: Thank you.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: [SOLVED] convert from sRGB to linear RGB

Post by magick »

We just finalized ImageMagick-6.7.7-10 / 7.0.0-0 to better support grayscale / linear RGB / sRGB based on your recommendations. The latest has just a few patches since yesterday.
Post Reply