tags 431939 - patch
thank you

Martín Ferrari wrote:
> llgal runs identify in each image in each run, just to verify that these
> are, in fact, images. This wastes a lot of resources, as identify is
> very slow, and can take ages on big directories. Most surely this can be
> better done with file, but for the time being, I'm just skipping the
> check (as is currently done with movies). Patch below.
>
> --- llgal.orig  2007-07-06 02:17:41.000000000 -0300
> +++ /usr/bin/llgal      2007-07-06 02:04:43.000000000 -0300
> @@ -242,6 +242,7 @@
>  }
>
>  sub check_image {
> +    return 0;
>      my $filename = shift ;
>      my ($status, @output) = Llgal::Utils::system_with_output
>         ( "check \"$filename\" validity",
>   

Well, this patch completely breaks the check, making llgal fail to skip
corrupted images and files that are wrongly named with an image-like
extension, so the patch is not valid at all :)

I never actually looked at how identify decreases performance since I
don't often use llgal on large directory. I don't remember exactly why I
switched to identify first, but I think it was required by some perl lib
which was not dealing with non-images nicely (return an error to llgal
when retrieving image dimensions, for instance). Since I changed these
libs since then (to use exiftool), I need to test again. If exiftool can
be run on non-image without breaking anything, I'll just use it and drop
the check entirely.

Thanks,
Brice


Reply via email to