Image copying: check if total == 0, use default total size
Issue #636 - Fixed loadImageSync(...) (caching on disk didn't work)