Download the PHP package gevman/azure-thumbnails without Composer
On this page you can find all versions of the php package gevman/azure-thumbnails. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gevman/azure-thumbnails
More information about gevman/azure-thumbnails
Files in gevman/azure-thumbnails
Package azure-thumbnails
Short Description Create image thumbnails with help of Microsoft Artificial Intelligence, and show what needed! After uploading an image, a high quality thumbnail gets generated and the Computer Vision API algorithm analyzes the objects within the image, then crops it to fit the requirements of the “region of interest” (ROI).
License MIT
Informations about the package azure-thumbnails
Azure Thumbnails
Create image thumbnails with help of Microsoft Artificial Intelligence, and show what needed!
A thumbnail is a small representation of a full-size image. Varied devices such as phones, tablets, and PCs create a need for different user experience (UX) layouts and thumbnail sizes. Using smart cropping, this Computer Vision API feature helps solve the problem.
After uploading an image, a high quality thumbnail gets generated and the Computer Vision API algorithm analyzes the objects within the image, then crops it to fit the requirements of the “region of interest” (ROI). The output gets displayed within a special framework as seen in below illustration. The generated thumbnail can be presented in a different aspect ratio than that of the original image to accommodate a user’s needs.
The thumbnail algorithm works as follows:
- Removes distracting elements from the image and recognizes the main object, the “region of interest” (ROI).
- Crops the image based on identified “region of interest”.
- Changes the aspect ratio to fit the target thumbnail dimensions.
Installation (using composer)
Methods
thumbnail(string $image, int $width, int $height)
Create thumbnail
$image
- full path of image$width
- thumbnail width$height
- thumbnail height
saveAs(string $file [, int $quality = 99])
Save thumbnail to specified path
$file
- full path of thumbnail$quality
- thumbnail quality
show([int $quality = 99][, string $contentType = 'image/jpeg'])
Show thumbnail
$quality
- thumbnail quality$contentType
- Content-Type header