A web-based image processing platform that converts images into multiple pixel-level representations including raw buffers, CSV formats, and Base64 encodings.
Built with Node.js, Canvas API, and TailwindCSS (no external CSS files required).
Upload or drag-and-drop an image and instantly generate:
- 🖼️ Base64 of original image
- 🧮 Raw pixel buffer array (RGBA Uint8 data)
- 🔐 Base64 encoded pixel buffer
- 📊 CSV representation of pixel values
- 🔐 Base64 encoded CSV string
This project focuses on low-level pixel representation pipelines:
- pixels → Uint8 RGBA array
- pixels → Base64(raw binary buffer)
- pixelsText → CSV (comma-separated integers)
- pixelsTextB64 → Base64(CSV string)
Image
↓
Canvas (ImageData)
↓
Uint8ClampedArray (RGBA pixels)
↓
┌───────────────────────────────┐
│ 1. Raw pixel buffer │
│ 2. Base64(pixel buffer) │
│ 3. CSV string │
│ 4. Base64(CSV string) │
└───────────────────────────────┘
- Drag & drop support
- Click-to-upload fallback
- Live image preview
- Multi-panel output dashboard
- Dark-themed UI using TailwindCSS
git clone https://github.com/BaseMax/image2pixel.git
cd image2pixel
npm installnpm startThen open:
http://localhost:3000
- Node.js (Express)
- Vanilla JavaScript
- HTML5 Canvas API
- TailwindCSS (CDN)
- FileReader API
The image is processed entirely in-browser using the Canvas API:
-
Image is loaded via
FileReader -
Drawn into an off-screen
<canvas> -
Extracted via:
getImageData(x, y, width, height)
-
Pixel data is accessed as:
Uint8ClampedArray [R, G, B, A, ...]
| Layer | Description |
|---|---|
| Raw pixels | Uint8 RGBA buffer |
| Base64 buffer | Binary encoding of pixel array |
| CSV | Human-readable pixel values |
| Base64 CSV | Encoded text form |
[255, 0, 0, 255, 10, 20, 30, 255, ...]
255, 0, 0, 255, 10, 20, 30, 255, ...
AP8A...
- Image-to-data conversion research
- Computer vision preprocessing experiments
- Educational pixel-level visualization
- Data compression experiments
- Custom ML dataset generation
- Large images may generate very large outputs
- CSV/Base64 outputs can become extremely heavy
- Processing is client-side (no server image storage)
This project is licensed under the GNU General Public License v3.0 (GPL-3.0).
You are free to:
- Use
- Modify
- Distribute
under the terms of the GPL-3.0 license.
See: https://www.gnu.org/licenses/gpl-3.0.html
Seyyed Ali Mohammadiyeh (MAX BASE)
- Pixel-level histogram visualization
- Grayscale / threshold filters
- Tensor export (NumPy / PyTorch format)
- WebGPU acceleration
- Image streaming & chunk processing
- Real-time pixel manipulation editor