1. Go to this page and download the library: Download prowebber/pure_image library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
$pimage->add->image('/home/user/original.jpg');
// Compress the image
$pimage->out->compress([
'quality' => 3,
'save_path' => '/home/user/compressed.jpg,
]);
// Create an image to fit the specified params
$pimage->out->fit([
'width' => 300,
'height' => 200,
'quality' => 3,
'save_path' => '/home/user/resized.jpg,
]);
// Create another image to fit the specified params
$pimage->out->fit([
'width' => 600,
'height' => 400,
'quality' => 3,
'save_path' => '/home/user/resized.jpg,
]);
// Create all images
$pimage->save->image();
$pimage->setMaxImageSize(10000000);
$result = $pimage->getResult();
$pimage->isErrorFree();
$pimage->showErrors();
$pimage->getErrors();
$pimage->getDetailedErrors();
$pimage->showDebug();
# Init pImage
$pImage = new PureImage();
# Add the image
$pImage->add->image('path/to/image.jpg');
# Check for errors triggered when the image was added
if(!$pImage->isErrorFree()){ # If there are errors
}
array[$image_id][$err_id] = Error message;
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.