mean-cj / fastimage
Laravel Fastimage Helper Library inspired by tommoor
dev-master
2014-01-09 17:08 UTC
Requires
- php: >=5.1
- lib-curl: *
This package is not auto-updated.
Last update: 2024-11-19 08:20:52 UTC
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.
make by https://github.com/tommoor/fastimage
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;
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
Download
Releases are available for download from GitHub.