GIF and PNG appear to be working.
Need to check data length for BMP and apply same approach