PHP code example of gstjohn / fastimage
1. Go to this page and download the library: Download gstjohn/fastimage 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/ */
gstjohn / fastimage example snippets
"http://farm9.staticflickr.com/8151/7357346052_54b8944f23_b.jpg";
// loading image into constructor
$image = new FastImage($uri);
list($width, $height) = $image->getSize();
echo "dimensions: " . $width . "x" . $height;
// or, create an instance and use the 'load' method
$image = new FastImage();
$image->load($uri);
$type $image->getType();
echo "filetype: " . $type;
{
"fastimage/fastimage": "dev-master"
}
}