Tool to read the color of a pixel in an image and extract the red, green, blue values or to extract all the pixels of the same color in an image.
Image Pixel Reader - 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!
The pixel (from the contraction of picture element) is the smallest element defined by a color in an image.
The pixel is only defined in raster images, there is no equivalent for vector images.
The image must be in a readable format (JPG, PNG, GIF are the most common) and have a non-vector format in order to extract information on their width (number of columns) and height (number of lines).
The pixel reading is usually a number, it can be associated with a table of contents (if the colors are indexed) or with an N-bit value (usually 24 bits).
This number can then be translated into 3 components: Red, Green and Blue.
Example: The number 16711680 (which is written ff0000 in hexadecimal) corresponds to the color red, it has two components: 255 (FF) Red, 0 (00) Green and 0 00 Blue.
Read each pixel, one by one, by row or by column and note the position of the pixels corresponding to a criterion.
To extract all the pixels having a given color, read all the values of each pixel and note their coordinates (rows, columns).
Colors can integrate an alpha channel (called transparency channel), and although the color is totally invisible (transparent) it can contain a color.
In computer science, it is common to start counting the first element from 0. This practice greatly simplifies the calculations.
Most software will then note the first pixel (ie. reading the top left pixel) with coordinates (x = 0, y = 0).
dCode retains ownership of the "Image Pixel Reader" source code. Any algorithm for the "Image Pixel Reader" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Image Pixel Reader" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Image Pixel Reader" or any other element are not public (except explicit open source licence like Creative Commons). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
The content of the page "Image Pixel Reader" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source.
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link:
In a scientific article or book, the recommended bibliographic citation is: Image Pixel Reader on dCode.fr [online website], retrieved on 2025-04-16,