Fix for portrait-orientation raw image reads, from Morteza Ramezanali