2017 © Pedro Peláez
 

library remote-image-info

get image information without downloading whole file

image

farmani/remote-image-info

get image information without downloading whole file

  • Monday, August 10, 2015
  • by farmani
  • Repository
  • 2 Watchers
  • 0 Stars
  • 22 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

RemoteImageInfo

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 'RemoteImageInfo.php';

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

// loading image into constructor
$image = new RemoteImageInfo($uri);
if($image->checkLoad()) {
    list($width, $height) = $image->getSize();
    echo "dimensions: " . $width . "x" . $height;
}


// or, create an instance and use the 'load' method
$image = new RemoteImageInfo();
$image->load($uri);
if($image->checkLoad()) {
    $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

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

Download

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

The Versions

10/08 2015

dev-master

9999999-dev https://github.com/farmani/RemoteImageInfo

get image information without downloading whole file

  Sources   Download

MIT

The Requires

  • ext-curl *
  • php >=5.4.0

 

image remote size dimension without download

10/08 2015

v0.1.2

0.1.2.0 https://github.com/farmani/RemoteImageInfo

get image information without downloading whole file

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *

 

image remote size dimension without download

10/08 2015

v0.1.1

0.1.1.0 https://github.com/farmani/RemoteImageInfo

get image information without downloading whole file

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *

 

image remote size dimension without download

10/08 2015

v0.1.0

0.1.0.0 https://github.com/farmani/RemoteImageInfo

get image information without downloading whole file

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *

 

image remote size dimension without download