tmpImage is unnecessary, so it's now optional.