fix resize bug

This commit is contained in:
gb 2023-05-06 16:47:00 +08:00
parent 459cafeb26
commit 75b140e1e2
1 changed files with 3 additions and 0 deletions

View File

@ -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();