From f05e1693b9724c942e3da9225dd670b9798afdff Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Fri, 29 Aug 2014 12:27:52 -0400 Subject: [PATCH] treat FTE as AlgorithmID=0 --- openbr/plugins/gallery.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openbr/plugins/gallery.cpp b/openbr/plugins/gallery.cpp index 1276ef5..f46896b 100644 --- a/openbr/plugins/gallery.cpp +++ b/openbr/plugins/gallery.cpp @@ -267,7 +267,7 @@ class utGallery : public BinaryGallery if (imageID.size() != 16) qFatal("Expected 16-byte ImageID, got: %d bytes.", imageID.size()); - const int32_t algorithmID = t.isEmpty() ? 0 : t.file.get("AlgorithmID"); + const int32_t algorithmID = (t.isEmpty() || t.file.fte) ? 0 : t.file.get("AlgorithmID"); const QByteArray url = t.file.get("URL", t.file.name).toLatin1(); uint32_t x = 0, y = 0, width = 0, height = 0; @@ -297,7 +297,7 @@ class utGallery : public BinaryGallery height = t.file.get("Height", 0); } - if (!t.empty()) + if (algorithmID != 0) data.append((const char*) t.m().data, t.m().rows * t.m().cols * t.m().elemSize()); br_const_utemplate ut = br_new_utemplate((const int8_t*) imageID.data(), algorithmID, x, y, width, height, url.data(), data.data(), data.size()); -- libgit2 0.21.4