bitandblack/image-information
最新稳定版本:3.2.0
Composer 安装命令:
composer require bitandblack/image-information
包简介
Reading information of images
关键字:
README 文档
README
Bit&Black Image Information
Read information of images:
- The size
- The color profile
Currently supported files and extensions:
avifAV1 Image File FormataiAdobe Illustrator ArtworkbmpWindows BitmapepsEncapsulated PostScriptgifGraphics Interchange FormaticoInitial Coin OfferingiffInterchange File Formatjp2,jpf(Extended) JPEG 2000jpg,jpegJoint Photographic Experts GrouppdfPortable Document FormatpngPortable Network Graphicspsd(Adobe) Photoshop DocumentsvgScalable Vector Graphicstif,tiffTagged Image File FormatwbmpWireless Application Protocol Bitmap FormatwebpGoogle WebP
Installation
This package is made for the use with Composer. Add it to your project by running $ composer require bitandblack/image-information.
Usage
Define your file with the File class. Init the Image class then and add your file:
<?php
use BitAndBlack\ImageInformation\Image;
use BitAndBlack\ImageInformation\Source\File;
$file = new File('MyFile.eps');
$image = new Image($file);
Access the image size: $image->getSize();
Access the images color profile: $image->getIccProfile();
Cache
You can speed up the library by using a cache. When initializing the image class, add a cache object as second parameter:
<?php
use BitAndBlack\ImageInformation\Cache\Cache;
use BitAndBlack\ImageInformation\Image;
use BitAndBlack\ImageInformation\Source\File;
$file = new File('MyFile.eps');
$image = new Image($file, new Cache());
Per default, the cache class uses a file system cache. This can be configured as only a PSR cache compatible class is needed.
Help
If you have questions feel free to contact us under hello@bitandblack.com.
Further information about Bit&Black can be found under www.bitandblack.com.
统计信息
- 总下载量: 1.68k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-02-14