Sha256: 98ce5f5e201100f3689046b1004f680f1dd4bcd07c5c9b8eeb62f3d3bc458ad7

Contents?: true

Size: 1 KB

Versions: 6

Compression:

Stored size: 1 KB

Contents

# image_size

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

[![Build Status](https://travis-ci.org/toy/image_size.png?branch=master)](https://travis-ci.org/toy/image_size)

## 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

6 entries across 6 versions & 1 rubygems

Version Path
image_size-1.4.0 README.markdown
image_size-1.3.1 README.markdown
image_size-1.3.0 README.markdown
image_size-1.2.0 README.markdown
image_size-1.1.5 README.markdown
image_size-1.1.4 README.markdown