From 3bf9f0d67130a750002fdbb2ab169d024dc4a4a0 Mon Sep 17 00:00:00 2001 From: gb <741021719@qq.com> Date: Thu, 3 Aug 2023 14:05:11 +0800 Subject: [PATCH] optimize imageInfoGet log --- twain/ds/huagaods.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/twain/ds/huagaods.cpp b/twain/ds/huagaods.cpp index 18538bd..9641c58 100644 --- a/twain/ds/huagaods.cpp +++ b/twain/ds/huagaods.cpp @@ -1291,23 +1291,21 @@ Result huagao_ds::imageInfoGet(const Identity&, ImageInfo& data) } else { - utils::log_info(" imageInfoGet is false\r\n", 1); + utils::log_info(" imageInfoGet = false\r\n", 1); data.setHeight(0); return { ReturnCode::XferDone, ConditionCode::Bummer }; } - char buf[128]; - std::string f("imageInfoGet:"); + int h = data.height(); int w = data.width(); int bitsPerPixel = data.bitsPerPixel(); Compression compression = data.compression(); PixelType pixelType = data.pixelType(); bool planar = data.planar(); - Fix32 xr = data.xResolution(); - sprintf(buf, "imageInfoGet: h-->%d w-->%d bitsPerPixel-->%d compression-->%d pixelType-->%d planar-->%d\r\n", h, w, bitsPerPixel, compression, pixelType, planar); - utils::log_info(buf, 1); + utils::to_log(LOG_LEVEL_DEBUG, "imageInfoGet = (%d * %d * %d), %dDPI\r\n", w, h, bitsPerPixel, res); + return success(); } Result huagao_ds::imageLayoutGet(const Identity&, ImageLayout& data)