update image serialization code in abr
This commit is contained in:
10
src/abr.cpp
10
src/abr.cpp
@@ -49,10 +49,11 @@ bool ABR::section_samp()
|
||||
auto vm = std::make_shared<VMArray>();
|
||||
if (vm->read(*this))
|
||||
{
|
||||
if (auto img = vm->image(true, true))
|
||||
auto img_data = vm->image(true, true);
|
||||
if (img_data.data)
|
||||
{
|
||||
// TODO: check if uid already exists in map
|
||||
m_samples[uid] = img;
|
||||
m_samples[uid] = std::make_shared<Image>(img_data);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -97,10 +98,11 @@ bool ABR::section_patt()
|
||||
LOG("PATT: image_mode (%d) and number of channels (%ld) not matching\n",
|
||||
image_mode, vm->channels.size());
|
||||
}
|
||||
if (auto img = vm->image(true, false))
|
||||
auto img_data = vm->image(true, false);
|
||||
if (img_data.data)
|
||||
{
|
||||
// TODO: check if uid already exists in map
|
||||
m_patterns[uid] = img;
|
||||
m_patterns[uid] = std::make_shared<Image>(img_data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user