-
Notifications
You must be signed in to change notification settings - Fork 18
/
README
30 lines (19 loc) · 760 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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-2011 Brandon Anderson, released under the MIT license
Contributions by Michael Sheakoski, Mike Boone and Dimitrij Denissenko