optimize imageInfoGet log

This commit is contained in:
gb 2023-08-03 14:05:11 +08:00
parent a7c44d9487
commit 3bf9f0d671
1 changed files with 4 additions and 6 deletions

View File

@ -1291,23 +1291,21 @@ Result huagao_ds::imageInfoGet(const Identity&, ImageInfo& data)
} }
else else
{ {
utils::log_info(" imageInfoGet is false\r\n", 1); utils::log_info(" imageInfoGet = false\r\n", 1);
data.setHeight(0); data.setHeight(0);
return { ReturnCode::XferDone, ConditionCode::Bummer }; return { ReturnCode::XferDone, ConditionCode::Bummer };
} }
char buf[128];
std::string f("imageInfoGet:");
int h = data.height(); int h = data.height();
int w = data.width(); int w = data.width();
int bitsPerPixel = data.bitsPerPixel(); int bitsPerPixel = data.bitsPerPixel();
Compression compression = data.compression(); Compression compression = data.compression();
PixelType pixelType = data.pixelType(); PixelType pixelType = data.pixelType();
bool planar = data.planar(); bool planar = data.planar();
Fix32 xr = data.xResolution(); utils::to_log(LOG_LEVEL_DEBUG, "imageInfoGet = (%d * %d * %d), %dDPI\r\n", w, h, bitsPerPixel, res);
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);
return success(); return success();
} }
Result huagao_ds::imageLayoutGet(const Identity&, ImageLayout& data) Result huagao_ds::imageLayoutGet(const Identity&, ImageLayout& data)