imagediff is a bit too sensitive, add 1px tolerance
added white background color, and implemented write