fix resize bug
This commit is contained in:
parent
459cafeb26
commit
75b140e1e2
|
@ -383,6 +383,7 @@ int32_t img_resizer::get_raw_value(const char* name, const char* key, std::strin
|
|||
{
|
||||
if(sane_cfg_provider::raw_value_in_json(child, key, val, type))
|
||||
ret = 0;
|
||||
|
||||
child->release();
|
||||
}
|
||||
|
||||
|
@ -397,6 +398,8 @@ img_one_paper* img_resizer::execute(img_one_paper* img)
|
|||
double ratio_x = dpi_ * 1.0f / v.head.resolution_x,
|
||||
ratio_y = dpi_ * 1.0f / v.head.resolution_y;
|
||||
cv::resize(v.img, v.img, cv::Size(0,0), ratio_x, ratio_y);
|
||||
v.head.resolution_x = dpi_;
|
||||
v.head.resolution_y = dpi_;
|
||||
}
|
||||
}
|
||||
img->add_ref();
|
||||
|
|
Loading…
Reference in New Issue