rexif  --The library to handle JPEG/EXIF for Ruby

[English] [Japanese]
Last-update: Feb.17.2003.

What's Rexif?

Rexif is a pure ruby library for handling JPEG/EXIF formatted images.

Rexif consists of two libraries; rjpeg.rb (for JPEG) and rexif.rb (for EXIF).

Requirements

Download

The latest version is rexif-0.4 (Feb.17.2003.).

Old versions are here.

Installation

% su
# ruby install.rb

Usage

See API reference document for detail.

1) Processing after parseing

require 'rexif'

Jpeg::use_class_for(Jpeg::Segment::APP1,Exif)
j=Jpeg::load('EXIF_FILE.JPG')
if(j.app1.is_exif?)
    puts j.app1.ifd0.marker
end

2) Processing with parseing

require 'rexif'

Jpeg::load('EXIF_FILE.JPG'){|seg|
    if(seg.marker==Jpeg::Segment::APP1)
         Exif.new(seg.marker,seg.byte_data){|dir|
              if(dir.tag==Exif::Ifd::Directory::Maker)
                  puts dir
	      end
              dir
         }
    else
        seg
    end
}

In this method, each return value of Jpeg::load()'s and Exif::new()'s block is treated as Jpeg segment data and Exif directory data, and those return values are stored to Jpeg object and Exif object.

Copying

Copyright © 2003 NISHI Takao <zophos@koka-in.org> All rights reserved.
This is free software with ABSOLUTELY NO WARRANTY.

You can redistribute it and/or modify it under the terms of Ruby's licence.

Restrictions

Changes

0.3 -> 0.4 (2003/2/17)
0.2 -> 0.3 (2003/2/13)
0.1 -> 0.2 (2003/2/12)
0.0 -> 0.1 (2003/2/4)

See Change Log for detail.