]> thyrsus.com Git - imgsizer.git/commitdiff
Don't hack percent sizes.
authorEric S. Raymond <esr@thyrsus.com>
Sat, 28 Jun 1997 14:07:56 +0000 (14:07 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Sat, 28 Jun 1997 14:07:56 +0000 (14:07 +0000)
imgsizer

index fea451d30316ab09b55c1bc50037a6ef0186228e..8e2d1c24565981979032bd69d54729db4a18a91a 100755 (executable)
--- a/imgsizer
+++ b/imgsizer
@@ -13,7 +13,7 @@
 # clearly mark an altered version.  Fixes and enhancements cheerfully 
 # accepted.
 #
-# This is version 1.2.
+# This is version 1.3.
 #
 
 # Anything that can fetch a URL defined on the command line 
@@ -104,6 +104,7 @@ sub attrfix
        }
        $url = $1;
 
+       # fetch the image
        if ($url =~ /^http:/) {
                $image = "imgsizer-tmp$$";
                $status = system("$fetcher ${url} >${image}");
@@ -118,6 +119,11 @@ sub attrfix
                
        }
 
+       # Don't try to fix up percent sizes
+       if ($attribs =~ /[0-9]%/) {
+               return $attribs;
+       }
+
        ($name, $size) = split(' ', `identify ${image}`);
        unlink("imgsizer-tmp$$");
        if ($name =~ /:/) {