2017 © Pedro Peláez
 

library fastimage

Fastimage

image

fastimage/fastimage

Fastimage

  • Monday, January 28, 2013
  • by gr0g
  • Repository
  • 1 Watchers
  • 3 Stars
  • 10,175 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 51 Forks
  • 1 Open issues
  • 1 Versions
  • 3 % Grown

The 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., (*1)

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., (*2)

```php { "require": { "fastimage/fastimage": "dev-master" } } ````, (*3)

https://packagist.org/packages/fastimage/fastimage, (*4)

References

  • https://github.com/sdsykes/fastimage
  • http://pennysmalls.com/find-jpeg-dimensions-fast-in-pure-ruby-no-ima
  • http://snippets.dzone.com/posts/show/805
  • http://www.anttikupila.com/flash/getting-jpg-dimensions-with-as3-without-loading-the-entire-file/
  • http://imagesize.rubyforge.org/

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, (*5)

Download

Releases are available for download from GitHub., (*6)

The Versions

28/01 2013

dev-master

9999999-dev https://github.com/sdsykes/fastimage

Fastimage

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

fastimage image size ruby port