Can I change the background of a QImage
created from a resource (png, jpg) file?
static QPixmap changeBackground(const QString resource, Qt::GlobalColor color)
{
QImage i(resource); // load png/img
i.fill(color);
return QPixmap::fromImage(i);
}
Result of my trial is an all filled with background color image. Any chance that I change the transparent background of the png/jpg resource file?