Optimizations for 1bpc images
Merge pull request #4356 from fkaelberer/Optimize_1bpc_images

Optimizations for 1 bpc images