FastImage finds the dimensions or filetype of an image given its uri by fetching as little as needed
PHP
Switch branches/tags
Nothing to show
#1 Compare This branch is 8 commits ahead, 8 commits behind tommoor:master.
Latest commit 4de9a36 Jan 28, 2013 @gr0g MOD: updating README

README.md

FastImage

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.