[ImageToolbox] rgb to grayscale

[ImageToolbox] rgb to grayscale

  
Forge Component
(8)
Published on 4 Jan by Breno Nico
8 votes
Published on 4 Jan by Breno Nico

Hi,

I'm using the toolbox and I get my images in Grayscale uploaded converted to RGB, but I need them to be in Grayscale to be sent to a printer, so they really need to be in Grayscale Mode for that, any idea?

Thanks

Hi Tomás,

The ImageTollbox is an component based on ImageMagick sdk/api. As I could check now, the last version (7x) was featured with this functionality (actually the forge component is based on version 6x).

I will try to update the component in the forge and publish a new version with this feature.

I'll say something soon.

Best regards.

Breno Nico

Solution

Hi Tomás,

As I promised, I published a new version of ImageToolbox, with a update to version 7.0.7-17 of the ImageMagick sdk/api. Now, you'll able to convert RGB image to Grayscalle. The ImageToolboxSample was also update to include this option on the combobox, as you can see in the image bellow:

Let us know that this solution fit your need.

Best regards.

Breno Nico.

Solution

Hi Nico,

thanks a lot for such a fast response and a great work, it works in tha way I need it (Convert mode to grayscale) but it makes a weird behavior, as you can see in the images attached:

ORIGINAL (RGB) first and then converted (gets really dark)


Hi Tomás,

The images you sent, looks the same to me. Technically what's the difference?

Best regards.

Breno Nico.

Hi Bruno,

they aren't the same, take a closer look, the converted one is really dark, so I'd like to be the same image, because it was already gray, I just need to change the mode from RGB to Grayscale, but not the balance ...

I've checked the Imagemagic and it says:

http://www.imagemagick.org/script/color-management.php


By default, converting color images to grayscale returns non-linear gray. To instead convert to linear gray, use the -set or -intensity or -grayscale options:


convert myimage.png -colorspace LinearGray myRGBimage.png
convert myimage.png -colorspace RGB -colorspace Gray myRGBimage.png
convert myimage.png -intensity Rec709luminance -colorspace gray myRGBimage.png
convert myimage.png -grayscale Rec709luminance myRGBimage.png


I think its converting to non-linear gray...

Bruno,

thank you very much, I solved it using two actions from the Toolbox, the first one is the
"-modulate 100,0" (convert to visual grayscale) and then I added the second one to really convert the color mode  ("-colorspace linear-gray") and it doesn't change the darkness, thanks a lot!