We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ea9338f commit e92de82Copy full SHA for e92de82
1 file changed
libimageviewer/quickprint/printimageloader.cpp
@@ -264,6 +264,11 @@ bool PrintImageLoader::loadImageData(PrintImageData::Ptr &imagePtr)
264
QImageReader reader(imagePtr->filePath);
265
// jumpToImage 可能返回 false, 但数据正常读取
266
reader.jumpToImage(imagePtr->frame);
267
+ if (!reader.canRead()) {
268
+ reader.setAutoDetectImageFormat(true); //控制是否通过内容识别格式
269
+ reader.setDecideFormatFromContent(true); // 根据内容识别格式
270
+ reader.setFileName(imagePtr->filePath); //必须重新设置一下文件,才能触发内部加载方式的切换
271
+ }
272
if (!reader.canRead()) {
273
qWarning() << QString("Load multi frame image failed(jump to image): %1").arg(reader.errorString());
274
imagePtr->state = ContentError;
0 commit comments