承接 nazieb/flashimage 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

nazieb/flashimage

最新稳定版本:v1.0.0

Composer 安装命令:

composer require nazieb/flashimage

包简介

Get the type & size information of an image by fetching as little as possible

README 文档

README

Get the type & size information of an image by fetching as little as possible.

This project is a fork of Fastimage library by Tom Moor, which itself is a port of Ruby implementation by Stephen Sykes

The main difference with the original library is that this one uses a PSR-7 compatible HTTP adapter to fetch image from the web, thanks to Ivory HTTP library by Eric Geloen

Installation

The recommended way to install FlashImage is by using Composer

To add FlashImage as dependency to your project, add a dependency on nazieb/flashimage to your project's composer.json file.

{
	"require": {
		"nazieb/flashimage": "~1.0"
	}
}

Usage

The main class of the FlashImage is the Flashimage\Factory which will load the image and initialize all the resource needed to fetch the data

$uri = "http://farm9.staticflickr.com/8151/7357346052_54b8944f23_b.jpg";
		
// loading image into constructor
$image = new Flashimage\Factory($uri);
list($width, $height) = $image->getSize();
echo "dimensions: " . $width . "x" . $height;

// or, create an instance and use the 'load' method
$image = new Flashimage\Factory();
$image->load($uri);
$type = $image->getType();
echo "filetype: " . $type;

Supported Formats

Currently FlashImage only support 4 types of image: png, jpeg, bmp, gif.

More to come, or if you think you can contribute to support more formats, please send a Pull Request.

References

License

MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-09-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固