Fixed image load bug in burn dialog.
Needs to be tested on Linux and Mac.
This commit is contained in:
@@ -203,7 +203,8 @@ void burnDialog::checkFw(QString fileName)
|
|||||||
QString ImageStr = g.profile[g.id()].splashFile();
|
QString ImageStr = g.profile[g.id()].splashFile();
|
||||||
bool PatchFwCB = g.profile[g.id()].patchImage();
|
bool PatchFwCB = g.profile[g.id()].patchImage();
|
||||||
if (!ImageStr.isEmpty()) {
|
if (!ImageStr.isEmpty()) {
|
||||||
QImage Image = qstring2image(ImageStr);
|
QImage Image;
|
||||||
|
Image.load(ImageStr);
|
||||||
ui->imageLabel->setPixmap(QPixmap::fromImage(Image.convertToFormat(flash.getSplashFormat())));
|
ui->imageLabel->setPixmap(QPixmap::fromImage(Image.convertToFormat(flash.getSplashFormat())));
|
||||||
ui->InvertColorButton->setEnabled(true);
|
ui->InvertColorButton->setEnabled(true);
|
||||||
ui->PreferredImageCB->setChecked(true);
|
ui->PreferredImageCB->setChecked(true);
|
||||||
@@ -633,7 +634,8 @@ void burnDialog::on_PreferredImageCB_toggled(bool checked)
|
|||||||
if (checked) {
|
if (checked) {
|
||||||
QString ImageStr = g.profile[g.id()].splashFile();
|
QString ImageStr = g.profile[g.id()].splashFile();
|
||||||
if (!ImageStr.isEmpty()) {
|
if (!ImageStr.isEmpty()) {
|
||||||
QImage Image = qstring2image(ImageStr);
|
QImage Image;
|
||||||
|
Image.load( ImageStr );
|
||||||
if (ui->imageLabel->width()!=128) {
|
if (ui->imageLabel->width()!=128) {
|
||||||
Image=Image.convertToFormat(QImage::Format_RGB32);
|
Image=Image.convertToFormat(QImage::Format_RGB32);
|
||||||
QRgb col;
|
QRgb col;
|
||||||
|
|||||||
@@ -694,6 +694,14 @@ QString image2qstring(QImage image)
|
|||||||
return ImageStr;
|
return ImageStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO KKERNEN 20140222
|
||||||
|
// I am sure that this code has had some kind of function, but now it only seems to cause
|
||||||
|
// problems. I think it is an attempt to open an image file from a double byte string which
|
||||||
|
// is first converted to a single byte string. Only used in burndialog.cpp
|
||||||
|
// It doesn't work for me in 2.0. I do not know why. I doubt it has ever worked for files or
|
||||||
|
// file paths containing non-english characters.
|
||||||
|
// Code can be removed ,when 2.0 is tested.
|
||||||
|
|
||||||
QImage qstring2image(QString imagestr)
|
QImage qstring2image(QString imagestr)
|
||||||
{
|
{
|
||||||
bool ok;
|
bool ok;
|
||||||
|
|||||||
Reference in New Issue
Block a user