From: Tim Hunter Date: 2007-10-22T06:42:09+09:00 Subject: Re: Problem using FileUtils to sort JPEG files forgottenwizard wrote: > On 22:20 Sun 21 Oct , Tim Hunter wrote: >> 7stud -- wrote: >> > 4) I couldn't find any documentation for the RMagick format() method, >>> which is pretty typical of the horrible ruby documentation, however this >>> works error free for me: >> The RMagick doc is not typical. It is the result of many hundreds of hours >> of my work. >> >> http://www.simplesystems.org/RMagick/doc/imageattrs.html#format > > Since you wrote the docs for RMagick (or alot of it, I'm guessing), can > you tell me how to have RMagick handle diffrent filetypes properly? I've > tried to have it check to see if a file was of an image type, and if not > ignore it (which would be closer to ideal), but I don't know how to do > that, and I havn't seen any docs on doing such. > > I wrote it all. To use RMagick to determine if an arbitrary file is an image file that it (that is, ImageMagick) can handle, try to read it. If it's not an image file, it'll raise an exception. -- RMagick OS X Installer [http://rubyforge.org/projects/rmagick/] RMagick Hints & Tips [http://rubyforge.org/forum/forum.php?forum_id=1618] RMagick Installation FAQ [http://rmagick.rubyforge.org/install-faq.html]