Memcpy in reverse order

BMP files do not store bytes in reverse order. They store lines of image in reverse order. You can still use Memcpy for single line of image, but you should reverse order of reading of those lines(start reading from end).