mirror of
https://invent.kde.org/frameworks/kimageformats.git
synced 2025-05-28 00:30:23 -04:00
PFM: fix error when loading images with comments
I tested the plugin with the images stored [here](https://github.com/walbourn/directxtexmedia). It contains PFM and PHM images but I didn't find any license on the repo, so the images was not added to test cases. I attach here the images that this patch allows to load: [grad4d_mono.pfm](/uploads/6e41fcb64d0651a6abd78cffc5ff86b2/grad4d_mono.pfm) [grad4d_mono.phm](/uploads/348a51476068aa344f67826006cb65c4/grad4d_mono.phm) [grad4d.phm](/uploads/2ab8330466f4dd0fc2fda00711270ce9/grad4d.phm)
This commit is contained in:
parent
ecbcf3b7f4
commit
86865223d2
BIN
autotests/read/pfm/comment_gray_half.phm
Normal file
BIN
autotests/read/pfm/comment_gray_half.phm
Normal file
Binary file not shown.
5
autotests/read/pfm/comment_gray_half.phm.json
Normal file
5
autotests/read/pfm/comment_gray_half.phm.json
Normal file
@ -0,0 +1,5 @@
|
||||
[
|
||||
{
|
||||
"fileName" : "testcard_gray_half.png"
|
||||
}
|
||||
]
|
@ -144,7 +144,10 @@ public:
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
auto wh = QString::fromLatin1(d->readLine(128));
|
||||
QString wh;
|
||||
do { // read line and skip comments
|
||||
wh = QString::fromLatin1(d->readLine(128));
|
||||
} while (wh.startsWith(QStringLiteral("#")));
|
||||
auto list = wh.split(QStringLiteral(" "));
|
||||
if (list.size() == 1) {
|
||||
m_ps = true; // try for Photoshop version
|
||||
|
Loading…
Reference in New Issue
Block a user