Fix JPG image rendering.

To pass QString as a const char* we should call <QString>.toLocal8Bit().constData().

https://github.com/ariya/phantomjs/issues/12684