https://github.com/jonathanprince/base64_img_php
PHP Class for saving base64 data as an image
https://github.com/jonathanprince/base64_img_php
Last synced: 4 months ago
JSON representation
PHP Class for saving base64 data as an image
- Host: GitHub
- URL: https://github.com/jonathanprince/base64_img_php
- Owner: JonathanPrince
- Created: 2015-01-15T07:08:20.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-01-20T16:23:46.000Z (over 11 years ago)
- Last Synced: 2024-12-30T22:10:31.778Z (over 1 year ago)
- Language: PHP
- Size: 160 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# base64_img_php
PHP Class for base64 image encoding and decoding
##Usage
```php
require 'path/to/class/b64img.php';
// encode file as data uri
$image1 = new B64img('./some_image.png');
$data_URI = $image1->get_data();
// save data uri as file
$image2 = new B64img($data_URI);
$image2->save_as('./new_image.png');
```