An open API service indexing awesome lists of open source software.

https://github.com/zeynepcol/pixel-matrix-converter

Extracts pixel data from images and converts it into array with RGB values and intensity mapping.
https://github.com/zeynepcol/pixel-matrix-converter

image-processing pixel-art python rgb

Last synced: about 1 year ago
JSON representation

Extracts pixel data from images and converts it into array with RGB values and intensity mapping.

Awesome Lists containing this project

README

          

Image Pixel Data Extraction Script

This project uses **Python's PIL (Pillow)** library to load, process, and extract pixel data from an image file. The program iterates over each pixel, computes an "intensity" value, and outputs pixel data in a format suitable for C++ array use, making it ideal for projects that involve image analysis or pixel-based graphical effects.

FEATURES

**1. Image Loading**

Opens an image file using **PIL.Image**.

**2. Image Resizing**

Optionally resizes the image to specified dimensions (default: 50x50 pixels).

**3. RGB Conversion**

Converts the image to RGB mode, ensuring compatibility with RGB-based calculations.

**4. Intensity Calculation**

Computes pixel intensity based on the average RGB values.

**5. C++ Array Output**

Outputs the pixel data in a C++ compatible array format for easy integration.

Requirements

**Python 3.6+**

**Pillow library (pip install pillow)**