Pass in a maximum size for image comparisons, to prevent allocating insane amounts of memory.
Merge commit '03002f91381b5e27c8eaef72721a59a0618a15ce' into develop