[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

tiff width/height?

matt

3/4/2008 6:38:00 PM

Does anyone have Ruby code for reading a TIFF image file's width/height
tags? Thx - m.

--
matt neuburg, phd = matt@tidbits.com, http://www.tidbits...
Leopard - http://www.takecontrolbooks.com/leopard-custom...
AppleScript - http://www.amazon.com/gp/product/...
Read TidBITS! It's free and smart. http://www.t...
3 Answers

Jan Friedrich

3/6/2008 8:55:00 AM

0

matt neuburg wrote:

> Does anyone have Ruby code for reading a TIFF image file's width/height
> tags? Thx - m.

You can use MiniExiftool (http://rubyforge.org/projects/mi...) but
it is maybe a little bit oversized for only get the image width an height.

Regards
Jan

Remco van 't Veer

3/6/2008 10:30:00 AM

0

TIFF is a bit hairy so it's pretty hard to do this in a one-liner.
Try EXIF Reader[1];

$ sudo gem install exifr
.
$ irb -rubygems
>> require 'exifr'
=> true
>> EXIFR::TIFF.new('some_image.tif').width
=> 269

[1] http://exifr.ruby...


On Tue, Mar 4, 2008 at 7:39 PM, matt neuburg <matt@tidbits.com> wrote:
> Does anyone have Ruby code for reading a TIFF image file's width/height
> tags? Thx - m.
>
> --
> matt neuburg, phd = matt@tidbits.com, http://www.tidbits...
> Leopard - http://www.takecontrolbooks.com/leopard-custom...
> AppleScript - http://www.amazon.com/gp/product/...
> Read TidBITS! It's free and smart. http://www.t...
>
>



--
http://blog.r...

matt

3/9/2008 4:50:00 AM

0

Jan Friedrich <janfri.rubyforge@gmail.com> wrote:

> matt neuburg wrote:
>
> > Does anyone have Ruby code for reading a TIFF image file's width/height
> > tags? Thx - m.
>
> You can use MiniExiftool (http://rubyforge.org/projects/mi...) but
> it is maybe a little bit oversized for only get the image width an height.

Thanks! m.


--
matt neuburg, phd = matt@tidbits.com, http://www.tidbits...
Leopard - http://www.takecontrolbooks.com/leopard-custom...
AppleScript - http://www.amazon.com/gp/product/...
Read TidBITS! It's free and smart. http://www.t...