Merge branch 'master' into harfbuzz

This commit is contained in:
Hermann Kraus 2012-07-29 01:48:48 +02:00
commit 2e3e76ebaa

View file

@ -12,7 +12,6 @@ passed = 0
def compare_pixels(pixel1, pixel2): def compare_pixels(pixel1, pixel2):
if pixel1 == pixel2: if pixel1 == pixel2:
return False return False
# will only work on little endian
r_diff = abs((pixel1 & 0xff) - (pixel2 & 0xff)) r_diff = abs((pixel1 & 0xff) - (pixel2 & 0xff))
g_diff = abs(((pixel1 >> 8) & 0xff) - ((pixel2 >> 8) & 0xff)) g_diff = abs(((pixel1 >> 8) & 0xff) - ((pixel2 >> 8) & 0xff))
b_diff = abs(((pixel1 >> 16) & 0xff)- ((pixel2 >> 16) & 0xff)) b_diff = abs(((pixel1 >> 16) & 0xff)- ((pixel2 >> 16) & 0xff))
@ -32,7 +31,7 @@ def compare(actual, expected):
im1 = mapnik.Image.open(actual) im1 = mapnik.Image.open(actual)
try: try:
im2 = mapnik.Image.open(expected) im2 = mapnik.Image.open(expected)
except IOError: except RuntimeError:
errors.append((None, actual, expected)) errors.append((None, actual, expected))
return -1 return -1
diff = 0 diff = 0