Fix bug where reading RGB images could cause a crash.

If MemoryRowOrder was BottomUp (the default) when an RGB image was
read, a segfault would occur.