Commit f05e1693b9724c942e3da9225dd670b9798afdff

Authored by Josh Klontz
1 parent ae7904e7

treat FTE as AlgorithmID=0

Showing 1 changed file with 2 additions and 2 deletions
openbr/plugins/gallery.cpp
... ... @@ -267,7 +267,7 @@ class utGallery : public BinaryGallery
267 267 if (imageID.size() != 16)
268 268 qFatal("Expected 16-byte ImageID, got: %d bytes.", imageID.size());
269 269  
270   - const int32_t algorithmID = t.isEmpty() ? 0 : t.file.get<int32_t>("AlgorithmID");
  270 + const int32_t algorithmID = (t.isEmpty() || t.file.fte) ? 0 : t.file.get<int32_t>("AlgorithmID");
271 271 const QByteArray url = t.file.get<QString>("URL", t.file.name).toLatin1();
272 272  
273 273 uint32_t x = 0, y = 0, width = 0, height = 0;
... ... @@ -297,7 +297,7 @@ class utGallery : public BinaryGallery
297 297 height = t.file.get<uint32_t>("Height", 0);
298 298 }
299 299  
300   - if (!t.empty())
  300 + if (algorithmID != 0)
301 301 data.append((const char*) t.m().data, t.m().rows * t.m().cols * t.m().elemSize());
302 302  
303 303 br_const_utemplate ut = br_new_utemplate((const int8_t*) imageID.data(), algorithmID, x, y, width, height, url.data(), data.data(), data.size());
... ...