ruby library to identify image format and dimension
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
.gitignore
CHANGELOG
Gemfile
Gemfile.lock
README.md
Rakefile
identify.gemspec

README.md

Identify

A pure ruby image identification library.

Install

gem install identify

Supported Formats

BMP, PNG, JPG, GIF, XPM, PPM, PGM, PNM, PBM, XBM, TIFF

Example

require 'identify'

p Identify.image File.binread("test/images/test.png", 1024)

Output

{:width=>253, :height=>178, :format=>"png"}

Testing

Tests require a local installation of ImageMagick and identify to be in your $PATH

TODO

Channel type, Depth, Colorspace and Resolution.

See Also

http://rubygems.org/gems/imagesize

License

MIT