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?".
q3cpma
Posts: 5 Joined: 2015-08-26T13:45:40-07:00
Authentication code: 1151
Post
by q3cpma » 2015-08-26T13:50:37-07:00
The tast I'm trying to accomplish isn't extraordinary but i'm failing hard at it. I've seen some forum topics, but their solutions didn't work for me.
Code: Select all
convert -colorspace sRGB -define "colorspace:auto-grayscale=off" -define "png:color-type=6" in.png out.png
Didn't work. Also tried with
Code: Select all
-set "colorspace:auto-grayscale" "false"
Thanks for reading.
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2015-08-26T14:06:31-07:00
There is no equivalent -define to the -set option. I believe that is only available in current release, IM 6.9.2-0. You do not mention your version of IM nor platform.
snibgo
Posts: 12159 Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK
Post
by snibgo » 2015-08-26T14:13:55-07:00
In modern versions of IM, grayscale is already in sRGB colorspace, meaning that it has a complex gamma curve that is roughly gamma=2.2.
What do you really want to do? How do you know you are not already doing it?
q3cpma
Posts: 5 Joined: 2015-08-26T13:45:40-07:00
Authentication code: 1151
Post
by q3cpma » 2015-08-26T15:20:29-07:00
Sorry, I was using an outdated version. I needed PNG24 output to go with Vapoursynth's IM plugin.
Using
Code: Select all
convert -colorspace sRGB -set "colorspace:auto-grayscale" "false" in.png PNG24:out.png
worked.
Also, it looks like the -define option is listed
here .
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2015-08-26T16:45:19-07:00
q3cpma wrote: Also, it looks like the -define option is listed
here .
I recently asked the developer if there was a -define equivalent. He told me no. So I either misunderstood or he has recently added it.
q3cpma
Posts: 5 Joined: 2015-08-26T13:45:40-07:00
Authentication code: 1151
Post
by q3cpma » 2015-08-27T02:50:18-07:00
Looks like it works too with -define (identify -format '%[colorspace]' out.png gives me sRGB).
dlemstra
Posts: 1570 Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:
Post
by dlemstra » 2015-08-27T14:14:02-07:00
I recently asked the developer if there was a -define equivalent. He told me no. So I either misunderstood or he has recently added it.
Or he works too much with IM7
This did not work in IM7 but does in IM6. We are now investigating how we can fix it in IM7.