diff --git a/device/gxx-linux/usb/src/async_model/img_process/algs/img_algorithm.cpp b/device/gxx-linux/usb/src/async_model/img_process/algs/img_algorithm.cpp index 1a6fea2..1228b15 100644 --- a/device/gxx-linux/usb/src/async_model/img_process/algs/img_algorithm.cpp +++ b/device/gxx-linux/usb/src/async_model/img_process/algs/img_algorithm.cpp @@ -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();