On 20 Mar 2007 at 19:46, Chris Parker wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Rob Dixon wrote: > > Chris Parker wrote: > >> > >> Hello all, > >> > >> How do I get text out of a tiff image? Scenario is that I have alot of > >> directories named (ex. 000, 020, 000) with files inside along the same > >> line ( 000.tiff, 034.tiff) and I need to get the date of the > >> paper(000.tiff) so I can rename the folder/directory to that date. > >> > >> I am not having alot of luck searching for this. A pointer to a module > >> to use along with some docs would be greatly appreciated. > > > > Hi Chris > > > > Image::Info should do what you want. Take a look at: > > > > http://search.cpan.org/~tels/Image-Info-1.24/lib/Image/Info.pm > > > > HTH, > > > > Rob > > > > This looks promising. Now I see the part on > $image_info($file{Comment}). How do I get a date out of this? It is a > scanned text document in tiff format. > > Scenario of what I am trying to do: > > c:\bla\image_viewer\1070000001\00008\tiff image. > I am trying to go from the image_viewer part and recurse down the dir > tree to each subdir and inside the sub is the tiff.
I need to pull the > date out of the tiff image (not the creation date or mod time) and > append it to the directory name. I don't have to code with me now, I > will post what i have tomorrow. Do you mean that these TIFF files are scans of documents with a date on and it's this date your after? If so, I think your looking for an OCR solution. There are many TIFF tags, including the XMP, EXIF, IPTC and PhotoShop Reasource (IRB) blocks and they will all store the creation/modification date. Unless you have stored the date in one of these tags (or created your own) I am not sure you will be able to get to it easily. Have a look below for a complete list of the tags. http://www.awaresystems.be/imaging/tiff/tifftags/baseline.html Other modlues that might help get metadata out of an image are Exif::Tool and Image::Magick. Good luck, Dp. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/