Fix JPG image rendering.

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

https://github.com/ariya/phantomjs/issues/12684
2.0
Vitaly Slobodin 2014-11-06 18:08:37 +03:00 committed by Ariya Hidayat
parent eddb0db1d2
commit 12870d90ad
1 changed files with 1 additions and 1 deletions

View File

@ -934,7 +934,7 @@ bool WebPage::render(const QString &fileName, const QVariantMap &option)
const char *f = 0; // 0 is QImage#save default
if( format != "" ){
f = format.toUtf8().constData();
f = format.toLocal8Bit().constData();
}
retval = rawPageRendering.save(outFileName, f, quality);