Colorspace RGB -> Log question

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
stevepugh
Posts: 43
Joined: 2008-01-21T12:34:36-07:00

Colorspace RGB -> Log question

Post by stevepugh »

Hi all,

Yet another colorspace question for you...trying to generate a Log colorspace DPX file (in this case, a slate image which starts as a PNG, gets text drawn on it, and gets saved out). So far, specifying "-colorspace Log" fails to give me a logarithmic image, as "identify -verbose" still indicates RGB colorspace.

I've recently read that the "-colorspace" option is only for internal handling, and that to change the colorspace of a file you are writing, one must use the "-type" parameter. However, I do not see a "-type Logarithmic" or somesuch.

Am I barking up the right tree?

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

Re: Colorspace RGB -> Log question

Post by fmw42 »

It works for me.

I don't think IM reports anything but RGB and Gray and such for colorspace. It does not store that information. I had requested it before. Nevertheless,

convert -size 128x128 gradient: grad128.png

and then convert grad128.png -colorspace LOG grad128log.png


you will see that the second one shows a logarithm application to the linear gradient.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Colorspace RGB -> Log question

Post by anthony »

Log appears to be an interesting colorspace...

Try and compare the output of these commands...

Code: Select all

convert -size 128x128 gradient: x:
convert -size 128x128 gradient: -colorspace LOG x:
convert -size 128x128 gradient: -negate -colorspace LOG -negate x:
Any idea as to what 'log' colorspace does, and if there is an inverse to it?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply