Sha256: 94beaf4a7ac3cf14d1699870d09e006811de49088d115164befcf511b4af209a

Contents?: true

Size: 915 Bytes

Versions: 4

Compression:

Stored size: 915 Bytes

Contents

# image_size

measure image size using pure Ruby
formats: `bmp`, `gif`, `jpeg`, `pbm`, `pcx`, `pgm`, `png`, `ppm`, `psd`, `swf`, `tiff`, `xbm`, `xpm`

## Download

The latest version of image\_size can be found at http://github.com/toy/image_size

## Installation

    gem install image_size

## Examples

    require 'image_size'

    p ImageSize.path('spec/test.jpg').size

    open('spec/test.jpg', 'rb') do |fh|
      p ImageSize.new(fh).size
    end


    require 'image_size'
    require 'open-uri'

    open('http://www.rubycgi.org/image/ruby_gtk_book_title.jpg', 'rb') do |fh|
      p ImageSize.new(fh).size
    end

    open('http://www.rubycgi.org/image/ruby_gtk_book_title.jpg', 'rb') do |fh|
      data = fh.read
      p ImageSize.new(data).size
    end

## Licence

This code is free to use under the terms of the Ruby's licence.

## Contact

Original author: "Keisuke Minami": mailto:keisuke@rccn.com

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
image_size-1.1.3 README.markdown
image_size-1.1.2 README.markdown
image_size-1.1.1 README.markdown
image_size-1.1.0 README.markdown