Skip to content

farmani/RemoteImageInfo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

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

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

Download

Releases are available for download from GitHub.

About

get image information without downloading whole file

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages