No commit activity in last 3 years
No release in over 3 years
A lightweight module designed to extract the width/height dimensions of various image types. Also supports SWFs. No supports SWF version too.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project 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