We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c1435b commit af931c7Copy full SHA for af931c7
src/core/tileset.cpp
@@ -563,7 +563,11 @@ bool Tileset::loadTilesImage(QImage *importedImage) {
563
imported = true;
564
} else if (QFile::exists(this->tilesImagePath)) {
565
// No image provided, load from file path.
566
- image = QImage(this->tilesImagePath).convertToFormat(QImage::Format_Indexed8, Qt::ThresholdDither);
+ image = QImage(this->tilesImagePath);
567
+ if (!image.isNull() && image.format() != QImage::Format_Indexed8) {
568
+ logWarn(QString("Tiles image '%1' is not indexed. Converting to indexed format.").arg(this->tilesImagePath));
569
+ image.convertTo(QImage::Format_Indexed8, Qt::ThresholdDither);
570
+ }
571
}
572
573
if (image.isNull()) {
0 commit comments