Tool to transform images into black and white (grayscale). A grayscale image is an image whose colors vary from white to black.
Grayscale Image - dCode
Tag(s) : Image Processing
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
Black and white is understood here as a grayscale gradient. For transforming an image into binary black or white (only black and white, no gray), indicate 2 shades of gray, and for the binary exploitation of the result, dCode has a tool for that:
Each color pixel in an image is typically defined by a triplet of red, green, and blue (RGB) values. But it is also possible to define it by a HSV triplet for hue (rather red, rather green, rather blue), saturation (rather bright color or rather grayish) and luminosity/value (rather light or rather dark). This brightness value is generally used to define the position / color of the pixel between black and white and thus obtain a grayscale image.
To calculate this luminosity, several algorithms / color referentials are possible, such as recommendations 709, 601 or 2100 used as a standard in photography or video (and from the CIE Commission Internationale de l'Éclairage).
dCode calculates the brightness value for each pixel in the image and returns a gray pixel of corresponding brightness.
If an error is returned, it may be an altered file, a bad image, or the file format does not match its extension.
Recommendation 709 is used as a standard for HDTV.
Recommendation 601 was used as a standard for analogic terrestrial television. Luminance is calculated as Gray = 0.299 * Red + 0.587 * Green + 0.114 * Blue
Example: A color representing the color Orange consisting of Red = 255, Green = 127, Blue = 0. Then the value of gray is 255*0.299+127*0.587+0*0.0114=151
dCode retains ownership of the "Grayscale Image" source code. Except explicit open source licence (indicated Creative Commons / free), the "Grayscale Image" algorithm, the applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or the "Grayscale Image" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and all data download, script, or API access for "Grayscale Image" are not public, same for offline use on PC, mobile, tablet, iPhone or Android app!
Reminder : dCode is free to use.
The copy-paste of the page "Grayscale Image" or any of its results, is allowed (even for commercial purposes) as long as you credit dCode!
Exporting results as a .csv or .txt file is free by clicking on the export icon
Cite as source (bibliography):
Grayscale Image on dCode.fr [online website], retrieved on 2024-11-21,