Skip to content

Commit 7e39809

Browse files
committed
Return raw info instead
1 parent 00c3ce5 commit 7e39809

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

delogo_engine.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ class DelogoEngine {
4242
int** logo_yc, ** logo_yd, ** logo_uc, ** logo_ud, ** logo_vc, ** logo_vd;
4343
int _wsubsampling, _hsubsampling;
4444
int _ebpc, _cutoff;
45+
LOGO_HEADER logoheader;
4546

4647
public:
47-
LOGO_HEADER logoheader;
48+
LOGO_HEADER src_logoheader;
4849

4950
DelogoEngine(const char* logofile, const char* logoname, int bitdepth, int wsubsampling, int hsubsampling, int left, int top, bool mono, int cutoff) :
5051
logo_yc(nullptr), logo_yd(nullptr),

delogo_engine.preprocess.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ LOGO_PIXEL* DelogoEngine<EOP>::readLogo(const char* logofile, const char* logona
3535
if (i == num) // So we couldn't find a match
3636
throw "unable to find a matching logo";
3737

38+
src_logoheader = logoheader;
39+
3840
// Now we can read it and return
3941
LOGO_PIXEL* lgd = new LOGO_PIXEL[logoheader.h * logoheader.w];
4042
if (lgd == NULL) throw "unable to allocate memory";

delogohd_filter.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ class DelogoHDFilter: public Interface {
3838
if (logofile == NULL)
3939
throw("where's the logo file?");
4040
engine = new DelogoEngine<EOP>(logofile, logoname, this->depth(), this->ssw(), this->ssh(), left, top, mono, cutoff);
41-
this->setVar("delogohd_left", engine->logoheader.x);
42-
this->setVar("delogohd_top", engine->logoheader.y);
43-
this->setVar("delogohd_width", engine->logoheader.w);
44-
this->setVar("delogohd_height", engine->logoheader.h);
41+
this->setVar("delogohd_left", engine->src_logoheader.x);
42+
this->setVar("delogohd_top", engine->src_logoheader.y);
43+
this->setVar("delogohd_width", engine->src_logoheader.w);
44+
this->setVar("delogohd_height", engine->src_logoheader.h);
4545
}
4646

4747
virtual auto get(int n) -> decltype(Interface::get(n)) {

0 commit comments

Comments
 (0)