https://github.com/codeadamca/php-pixelate
Converting an image to an 8-bit pixelated version using vanilla PHP and GD library.
https://github.com/codeadamca/php-pixelate
Last synced: 3 months ago
JSON representation
Converting an image to an 8-bit pixelated version using vanilla PHP and GD library.
- Host: GitHub
- URL: https://github.com/codeadamca/php-pixelate
- Owner: codeadamca
- Created: 2025-02-04T16:30:48.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-02-04T17:24:12.000Z (5 months ago)
- Last Synced: 2025-02-04T18:19:42.836Z (5 months ago)
- Language: PHP
- Homepage:
- Size: 477 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pixelating an Image
Converting an image to an 8-bit pixelated version using vanilla PHP and GD library.
The original function logic was inspired by the following Stack Overflow question:
https://stackoverflow.com/questions/5752514/how-to-convert-png-to-8-bit-png-using-php-gd-library
Below are three images representing the original, the PHP converted image, and the same image converted using Photoshop:
> [!NOTE]
> The `image-rendering: pixelated;` style prevents the browser from trying to optimize the iamge.---
## Project Stack
This project uses vanilla [PHP](https://www.php.net/) and the PGP [GD Library](https://www.php.net/manual/en/book.image.php).
---
## Repo Resources
* [GD Library](https://www.php.net/manual/en/book.image.php)