fixed bmp parsing bug where some header versions were not getting a palette entry set
fixed jpg parsing bug where density units read 1 bytes into a short, resulting in random bad data in one of the bytes