Fix for #254

Added a fix for issue #254, regarding a bug in image transformations resulting from uninitialized memory (especially noticeable on machines with limited physical memory available).