From 2c2809d77ee1c1540b88a3b662f7113ab7d42cdf Mon Sep 17 00:00:00 2001 From: mrDarker <mr.darker@163.com> Date: 星期二, 15 七月 2025 11:02:47 +0800 Subject: [PATCH] 重构:保存图片逻辑,替换 IplImage 为 cv::Mat - 将 保存图片中的 IplImage 接口升级为现代 OpenCV cv::Mat 实现 - 添加图像指针、尺寸等边界条件校验,避免空指针和非法尺寸写入 - 简化图像转换与保存流程,提高代码可维护性 - 保留 JPEG 压缩质量参数,保持原有功能不变 --- EdgeInspector_App/InterfaceManager.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/EdgeInspector_App/InterfaceManager.h b/EdgeInspector_App/InterfaceManager.h index 175d77f..3087daa 100644 --- a/EdgeInspector_App/InterfaceManager.h +++ b/EdgeInspector_App/InterfaceManager.h @@ -100,7 +100,7 @@ BOOL IsScanNow(); int LoadFullImage(CString strPath,int iSide,int nStartY = 0, CGlass_Data *pGlassData = NULL, const bool bIsDebugImg = true); BOOL SaveFullImage(CString strPath,int iSide,CPoint ptStart,int nLineCnt); - BOOL SaveFullImage2(CString strPath,LPBYTE lpOrigin,int nImgWidth,int nImgHeight,int iSide,int nStartY,int nQuality = 50); + BOOL SaveFullImageModern(CString strPath,LPBYTE lpOrigin,int nImgWidth,int nImgHeight,int iSide,int nStartY,int nQuality = 50); LPBYTE GetGrabBuffer(DimensionDir eDir,int iVline); BOOL SetLiveGrabCommand(DimensionDir eDir,BOOL bStop); void WriteLogManager(TCHAR *str); -- Gitblit v1.9.3