Minor cleanup.
Refactor emptyImage avoid reprocessing, which allows animation to have blank frames
Only duplicate frames if error>0