cmpimg: add image diff output function for debugging golden image differences
Created by: kortschak
Debugging the failure of #396 was difficult because of possible hardware differences between travis and local machines. To debug the failure I used gimp to get a subtractive image of the golden v output images. We can do this in cmpimg in an easier way; I suggest we add ImageDiff(a, b image.Image) image.Image
that does a subtraction of b
from a
and scales the intensity of difference to maximise the dynamic range if they are different. The resulting image should then be output as a base64 png with the prefix IMAGE:
to make it possible to extract image failures from travis and use the playground's image rendering feature.