定制 gstjohn/fastimage 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

gstjohn/fastimage

最新稳定版本:v1.0.0

Composer 安装命令:

composer require gstjohn/fastimage

包简介

FastImage finds the size or type of an image given its uri by fetching as little as needed, ported by Tom Moor.

README 文档

README

FastImage finds the dimensions or filetype of a remote image file given its uri by fetching as little as needed, based on the excellent Ruby implementation by Stephen Sykes.

Usage

<?php 
		
require 'Fastimage.php';
		
$uri = "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;

Composer

To add Fastimage as a local, per-project dependency to your project, simply add a dependency on fastimage/fastimage to your project's composer.json file.

{
	"require": {
		"fastimage/fastimage": "dev-master"
	}
}

https://packagist.org/packages/fastimage/fastimage

References

License

FastImage is released under the MIT license. It is simple and easy to understand and places almost no restrictions on what you can do with the software. More Information

Download

Releases are available for download from GitHub.

统计信息

  • 总下载量: 526
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 58
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-16