https://github.com/rubyonworld/imagespec
ImageSpec is a lightweight module designed to extract width/height dimensions from most standard image formats, as well as SWFs.
https://github.com/rubyonworld/imagespec
image module ruby spec
Last synced: 9 months ago
JSON representation
ImageSpec is a lightweight module designed to extract width/height dimensions from most standard image formats, as well as SWFs.
- Host: GitHub
- URL: https://github.com/rubyonworld/imagespec
- Owner: RubyOnWorld
- License: bsd-3-clause
- Created: 2022-09-27T15:39:17.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-09-28T01:14:45.000Z (almost 4 years ago)
- Last Synced: 2024-12-28T14:27:16.164Z (over 1 year ago)
- Topics: image, module, ruby, spec
- Language: Ruby
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this 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-2011 Brandon Anderson, released under the MIT license
Contributions by Michael Sheakoski, Mike Boone and Dimitrij Denissenko