base64 / images-converter
convert image to base64,convert base64 to image
dev-master
2016-04-13 09:43 UTC
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2025-01-24 19:44:00 UTC
README
Encode and Decode images to Base64
Author :
Themer MABROUK
themer.mabrouk@proxym-it.com
Installation :
Via Composer :
$composer require base64/images-converter "dev-master"
Enable the bundle in the kernel:
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new images\base64ConverterBundle\imagesbase64ConverterBundle(),
// ...
);
}
Usage :
public function indexAction(Request $request)
{
//...
$base64_converter=$this->container->get('base64_converter');
//Encode Image to base64
$encoded_img=$base64_converter->imageToBase64('path');
//Decode Image and make a file
$base64_converter->Base64ToImage($encoded_img,'path/newFile');
//...
}