APM: Perl GIF Integrity Check?
Tim Peoples
tim at toolman.org
Wed Dec 1 09:02:44 CST 2004
The ImageMagick 'ping' method is just what you're looking for.
Tim.
On Wed, 2004-12-01 at 08:17, Wayne Walker wrote:
> 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
--
_______________________________________________________________________
Timothy E. Peoples
Have Camel, Will Code
tim at toolman.org
More information about the Austin
mailing list