Made pixel format conversions more accurate.