# try commands in least to most expensive order, and notice when a command
# returns not to try it again.
#
+# Fixes by ESR, 29 July 2001
+#
+# Incorporated fixes by Peter S. Galbraith.
+#
import sys, os, getopt, cmp, string, re, urllib, commands
version = "2.1, 26 July 2001";
attributes = attributes + ch
outfp.write(transform(attributes) + ">")
-x_match = re.compile (r" ([0-9]+) *x *([0-9]+) ")
-rdjpg_match = re.compile (r" ([0-9]+)w *\* *([0-9]+)h ")
+x_match = re.compile (r" ([0-9]+) *x *([0-9]+)")
+rdjpg_match = re.compile (r" ([0-9]+)w *\* *([0-9]+)h")
def imgsize(src):
"Return the image size in pixels for a given image source."
return (sizes.group(1), sizes.group(2))
elif rdjpgcom:
# Use rdjpcom(1) to handle JPEGs
- (status, output) = commands.getstatusoutput("rdjpcom " + filename)
+ (status, output) = commands.getstatusoutput("rdjpgcom -verbose " + filename)
sizes = rdjpg_match.search(output)
if sizes:
return (sizes.group(1), sizes.group(2))