Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image styles: "Desaturate" is "Grayscale" really. #1771

Open
klonos opened this issue Apr 2, 2016 · 9 comments
Open

Image styles: "Desaturate" is "Grayscale" really. #1771

klonos opened this issue Apr 2, 2016 · 9 comments

Comments

@klonos
Copy link
Member

klonos commented Apr 2, 2016

backdrop-image_style_preview-desaturate

It's not just the preview - the actual effect applied is grayscale.

@klonos
Copy link
Member Author

klonos commented Apr 2, 2016

...now, I have not used it recently, but it's the same with D7 and D8. I'm really surprised the nobody has complained about it!?

@klonos
Copy link
Member Author

klonos commented Apr 2, 2016

Was there ever an actual desaturate effect in previous versions of Drupal?

Anyways, we should:

  • rename the effect to "Grayscale" cause that's what it actually does
  • see if we can add an actual desaturate effect if possible
  • Let the guys over in d.org know about it

@Graham-72
Copy link

I have not used it recently

I have never used it, nor ever thought of doing so. Likewise mirror/flip issue #1762
Why keep them? Just asking.

@klonos
Copy link
Member Author

klonos commented Apr 2, 2016

People find them useful + they serve as examples for contrib I guess.

@ghost
Copy link

ghost commented Apr 2, 2016

@klonos : "Grayscale" applies to a color representation using a single channel;
"Desaturation" applies to an image transformation of a multiple channels image that equalize the three channels (in case of RVB model), or set the Saturation channel to 0 (in case of HSV model), etc...

So Desaturation is more exact : if you look at a desaturated image/jpeg in a photoshop like software, it's still a color image !

What shocks you is that it is a "Total Desaturation" effect, while you were waiting for a slider to apply a partial desaturation…

@klonos
Copy link
Member Author

klonos commented Apr 2, 2016

Since we do not provide any option to set the level of desaturation and we apply a "total desaturation" (=grayscale), I think we should be calling the thing what it is so that users know what to expect.

Besides:

https://github.com/backdrop/backdrop/blob/1.x/core/includes/image.inc#L364

/**
 * Converts an image to grayscale.
 *

https://github.com/backdrop/backdrop/blob/1.x/core/modules/system/image.gd.inc#L197

/**
 * Convert an image resource to grayscale.
 *

https://github.com/backdrop/backdrop/blob/1.x/core/modules/system/image.gd.inc#L215

return imagefilter($image->resource, IMG_FILTER_GRAYSCALE);

@ghost
Copy link

ghost commented Apr 2, 2016

May I suggest that backdrop (and drupal, and php) may be wrong ?

$ exiftool ~/Sites/backdrop/sites/base/files/styles/desaturate/public/inline-images/2016/04/02/IMG_0335.preview.jpg 
ExifTool Version Number         : 9.98
File Name                       : IMG_0335.preview.jpg
……
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
JFIF Version                    : 1.01
Resolution Unit                 : None
X Resolution                    : 1
Y Resolution                    : 1
Comment                         : CREATOR: gd-jpeg v1.0 (using IJG JPEG v70), quality = 75.
Image Width                     : 240
Image Height                    : 160
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3                 <<<<<<<<<<<<<<<<<<<<<<
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
Image Size                      : 240x160
Megapixels                      : 0.038

made with backdrop !
capture d ecran 2016-04-02 a 19 46 53

@klonos
Copy link
Member Author

klonos commented Apr 3, 2016

My point was that, technicalities and term definitions aside, we intent to display this word to the end users. These users might not be design or multimedia experts and all they see when they apply the effect is their image turn grayscale (some people might even call it "black and white" because they do not understand the difference). Also, they understand "grayscale" while they have to look up the word "desaturate". Even if they don't understand either of these terms, say they google both...

grayscale:

a range of grey shades from white to black, as used in a monochrome display or printout.

...gray, shades of black and white. Sure, I understand that.

desaturate

make unsaturated or less saturated

...explaining a word with more derivatives of the same word. Great! ...lets try again:

saturate

cause (something) to become thoroughly soaked with water or other liquid so that no more can be absorbed.

WTF? ...don't understand! Lets give it a go to see what it does... aaah! IT'S GRAYSCALE/B&W!!

Catch my drift now?

@bdanin
Copy link

bdanin commented May 3, 2016

I agree that using the word "desaturate" is a lot more confusing that "grayscale", because I was looking for something that could partially desaturate an image and this effect only does one function: 100% desaturation to grayscale

I am in favor of calling it "grayscale" for semantic clarity.

@klonos klonos self-assigned this Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants