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!
Tool to transform images into black and white (grayscale). A grayscale image is an image whose colors vary from white to black.
! Black and white means here as grayscale gradient. For the transformation of an image into black or white binary, see the binary image tool.
Each color pixel of an image is generally defined by a triplet of values of red, green and blue, but can also be defined by a triplet hue, saturation, brightness. This brightness value is the position of the pixel between black and white.
To calculate this brightness, several algorithms / color references are possible, like the recommendations 709, 601 or 2100 used as standard in photography or video (and from the CIE International Commission of Lighting).
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. The luminance is calculated as Gray = 0.2125 * Red + 0.7154 * Green + 0.0721 * Blue
Example: A color representing the color Orange consisting of Red = 255, Green = 127, Blue = 0. Then the value of gray is 255*0.2125+127*0.7154+0*0.0721=145
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 source code of the script Grayscale Image online. Except explicit open source licence (indicated Creative Commons / free), any algorithm, applet, snippet, software (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any function (convert, solve, decrypt, encrypt, decipher, cipher, decode, code, translate) written in any informatic langauge (PHP, Java, C#, Python, Javascript, Matlab, etc.) which dCode owns rights will not be released for free. To download the online Grayscale Image script for offline use on PC, iPhone or Android, ask for price quote on contact page !