2017 © Pedro Peláez
 

library fastimage

Finds the size and type of a remote image by fetching as little as needed. PHP port of Ruby fastImage.

image

romaricdrigon/fastimage

Finds the size and type of a remote image by fetching as little as needed. PHP port of Ruby fastImage.

  • Tuesday, August 18, 2015
  • by romaricdrigon
  • Repository
  • 1 Watchers
  • 2 Stars
  • 14,572 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 51 Forks
  • 1 Open issues
  • 4 Versions
  • 12 % 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)

This version was forked from Tom Moor PHP port, and introduced a few changes:, (*2)

  • usage of exceptions
  • ability to customize HTTP headers
  • namespaced, composer-ready

Usage

<?php 

require 'Fastimage.php';

$uri = "http://farm9.staticflickr.com/8151/7357346052_54b8944f23_b.jpg";

// loading by creating 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, (*3)

The Versions

18/08 2015

dev-master

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

Finds the size and type of a remote image by fetching as little as needed. PHP port of Ruby fastImage.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

18/08 2015

0.9.2

0.9.2.0 https://github.com/romaricdrigon/fastimage

Finds the size and type of a remote image by fetching as little as needed. PHP port of Ruby fastImage.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

18/08 2015

0.9.1

0.9.1.0 https://github.com/romaricdrigon/fastimage

Finds the size and type of a remote image by fetching as little as needed. PHP port of Ruby fastImage.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

18/08 2015

0.9

0.9.0.0 https://github.com/romaricdrigon/fastimage

Finds the size and type of a remote image by fetching as little as needed. PHP port of Ruby fastImage.

  Sources   Download

MIT

The Requires

  • php >=5.4.0