Add padding to allocated image data.

This prevents undefined reads at the end of the memory blocks if SSE optimizations are used which use 8 bytes per iteration and thus could overrun the memory.