A simple pixel inspector for reading RGB or RGBA pixel values of the images.
- Python 3.8 or above. (This piece of work was developed with Python 3.8.5).
- numpy
- matplotlib
- tkinter (, which is the standard Python interface to the Tk GUI toolkit. Hence, no need to install it.)
- Only png files are supported.
- Change to the project directory,
python display.py
will launch the GUI interface of this pixel inspector. - Use the class
PixelInspector
ininspector.py
to inspect the pixels with the command line.- For example,
python
>>>import inspector
>>>pi = inspector.PixelInspector('./demo/stinkbug.png')
>>>print(pi.inspect(300, 300))
python
>>>import inspector
>>>pi = inspector.PixelInspector.demo()
- The demo image (demo/stinkbug.png) is from Matplotlib Image tutorial.