Page 1 of 1
Possible bug when defining a new ColorSpace
Posted: 2017-04-09T21:25:40-07:00
by pablobhz
Hello everyone. I've noted this today.
When you set the ColorSpace to CMYK, you expect the channels to be "Cyan, Magenta, Yellow, Black".
However, it isn't being that way. I attached an screenshot, where channels can be clearly see as "Cyan , Green , Blue, Black".
Even when i set the ColorSpace to sRGB , the channels available are "Cyan, Green, Blue".
On the screenshot above, i defined the ColorSpace as CMYK
Edit
Version: MagickNET-Q16-x64 v7.0.5.501
Re: Possible bug when defining a new ColorSpace
Posted: 2017-04-09T23:25:03-07:00
by fmw42
Use -colorspace CMYK not -set colorspace CMYK . But to be sure we understand what you are trying to do, please provide your command line.
I have moved this post to the Magick.Net forum since it is most likely an issue of command syntax.
Re: Possible bug when defining a new ColorSpace
Posted: 2017-04-09T23:31:44-07:00
by pablobhz
The syntax is correct.
Code: Select all
using (MagickImage testImage = new MagickImage(@"C:\inputfolder\testimage.png"))
{
testImage.ColorSpace = ColorSpace.CMYK;
}
I'm not using the command line interface, i'm using the .NET Wrapper.
After set the ColorSpace to CMYK, when i try to access the channels they aren't being set plus appear like "Cyan , Green , Blue, Black"(instead of the CMYK).
Re: Possible bug when defining a new ColorSpace
Posted: 2017-04-10T07:46:58-07:00
by snibgo
Where has that screenshot come from? Perhaps that program is the one that has a bug.
Re: Possible bug when defining a new ColorSpace
Posted: 2017-04-10T07:47:56-07:00
by pablobhz
The screenshot came from Visual Studio 2015 (Community Edition, Free)
Re: Possible bug when defining a new ColorSpace
Posted: 2017-04-10T18:20:56-07:00
by snibgo
As far as I know, IM doesn't write channel names "red", "cyan" etc into files. It writes colorspaces (sRGB, Lab, CMYK etc) into files, and programs such as IM's "identify" then expand these into channel names.
I suggest you try identify and exiftool on your file. You might also try a binary search in the file for those strings.
Re: Possible bug when defining a new ColorSpace
Posted: 2017-04-10T18:25:07-07:00
by pablobhz
Let me see if i got it correctly.
My goal: After set the image ColorSpace to CMYK , set the channels individually on the image. IM won't do that ?
Ex:
1 - Set the image colorspace to CMYK
2 - On some pixels , i want C(0), M(0.3), Y(0.1), K(0)
Re: Possible bug when defining a new ColorSpace
Posted: 2017-04-10T18:52:20-07:00
by fmw42
I would suggest you change the pixel values in the individual grayscale images first, then combine into CMYK colorspace.
Re: Possible bug when defining a new ColorSpace
Posted: 2017-04-11T08:00:46-07:00
by pablobhz
A grayscale image has only one channel. I need to change the values on a rGB scale or CMYK scale.
I got an method that uses unsafe code (pointers to the memory) for doing that ; however, it's still slow for doing all the stuff. I think MagickNET can be faster.
Should i delete this topic, since it isn't about an bug or something ?
Re: Possible bug when defining a new ColorSpace
Posted: 2017-04-11T08:43:15-07:00
by snibgo
Don't delete it.
If you have a usage question, please start a new thread.