APM: Perl GIF Integrity Check?

Wayne Walker wwalker at bybent.com
Wed Dec 1 08:17:06 CST 2004

I'd recommend using ImageMagick or GD.  you should be able to call
load_image() or whatever and it should return success or failure.

That would validate the images I'd think.

This is all just a SWAG though. YMMV.

On Wed, Dec 01, 2004 at 01:03:24AM -0600, David Bluestein II wrote:
> Okay, weird problem. I've got a directory of a pile of thumbnails
> on server a, that is rsync'd to server b. Now some of the GIF files
> on server a are bad (same filesize, modify date, etc.) due to a disk
> problem and cannot be viewed. Is there a way in Perl that I can validate
> which files on server a are not valid GIF files? I want to delete them
> and restore from server b which has valid copies, but do not want to
> restore all the files.
> I basically need:
> for (@filelist) {
> unless (validatefileisvalidgif ($_) {
> unlink $_;
> }
> }
> Anyone know of a quick validefileisvalidgif function/module? I'd even settle for a shell script.
> David


Wayne Walker
wwalker at bybent.com                 Do you use Linux?!
http://www.bybent.com              Get Counted!  http://counter.li.org/
Perl - http://www.perl.org/        Perl User Groups - http://www.pm.org/
Jabber:  wwalker at jabber.ntrc.net   AIM:     lwwalkerbybent
IRC:     wwalker on freenode.net

More information about the Austin mailing list