Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A lightweight module designed to extract the width/height dimensions of various image types. Also supports SWFs
Ruby
Branch: master
Pull request Compare This branch is 27 commits ahead of alexandrebini:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.gitignore
.travis.yml
Gemfile
Gemfile.lock
LICENSE
README
Rakefile
init.rb
ruby-imagespec.gemspec

README

ImageSpec
=========

ImageSpec is a lightweight module designed to extract width/height dimensions from most standard image formats, as well as SWFs.

This is a work in progress.  I intend on expanding this to include other details (EXIF, various metadata, etc.) as well.


Example
=======

# From a file in your file system
instance = ImageSpec.new('/path/to/your/file')

# From a URL
instance = ImageSpec.new('http://example.com/image.png')

# From an IO stream
file = File.new('/path/to/your/file', 'rb')
instance = ImageSpec.new(file)

instance.width
instance.height
instance.content_type

Pretty simple, huh?

Copyright (c) 2008 Brandon Anderson, released under the MIT license

Contributions by Michael Sheakoski and Mike Boone
Something went wrong with that request. Please try again.