mirror of https://github.com/vitalif/phantomjs
Fix JPG image rendering.
To pass QString as a const char* we should call <QString>.toLocal8Bit().constData(). https://github.com/ariya/phantomjs/issues/126842.0
parent
eddb0db1d2
commit
12870d90ad
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue