From a020f5b9bffcaac4857ec634ea111fe1198446c8 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 28 Jun 1997 14:07:56 +0000 Subject: [PATCH] Don't hack percent sizes. --- imgsizer | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/imgsizer b/imgsizer index fea451d..8e2d1c2 100755 --- 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 =~ /:/) { -- 2.43.0