Ruby wrapper for libtiff with FFI
Latest commit bf1121f Sep 26, 2011 @bernerdschaefer Add Tiff::Image#set_field! for manual fields
This delegates directly to the FFI bound set_field method, passing along
the user's arguments.


This is a simple wrapper around libtiff using FFI. It only implements a small subset of libffi's features -- just enough to generate a TIFF image and read back some of its data. If you're interested in adding features, you can always send me a pull request (please include specs!).

Usage "filename.tif", "w" do |tiff|

  tiff.set_field :compression, :CCITTFAX4
  # or: tiff.set_field :compression, :CCITTFAX3

  tiff.set_field :photometric, :min_is_white
  # or: tiff.set_field :photometric, :min_is_black

  tiff.bits_per_sample = 1
  tiff.width = 200
  tiff.height = 40 = raw_data


image = "filename.tif", "r"
image.get_field :width  # => 200
image.get_field :height # => 40