@@ -185,7 +185,7 @@ void CImageProcessView::ShowBitmap(CDC *pDC, CString BmpName)
185185 dcBmp.SelectObject (&m_bitmap); // 将位图选入临时内存设备环境
186186
187187 pDC->SetTextColor (RGB (255 , 0 , 0 ));
188- pDC->TextOut (0 , m_bmp.bmHeight + 1 , m_pDrawText.GetAt (0 ), sizeof (m_pDrawText.GetAt (0 )) - 1 );
188+ pDC->TextOut (0 , m_bmp.bmHeight + 1 , m_pDrawText.GetAt (0 ), _tcslen (m_pDrawText.GetAt (0 )) );
189189
190190 // 图片显示调用函数stretchBlt
191191 pDC->StretchBlt (0 , 0 , m_bmp.bmWidth , m_bmp.bmHeight , &dcBmp, 0 , 0 , m_bmp.bmWidth , m_bmp.bmHeight , SRCCOPY);
@@ -286,7 +286,7 @@ void CImageProcessView::ShowBitmap(CDC *pDC, CString BmpName)
286286 // dcBmpTemp.TextOut(bmpTemp.bmWidth / 2, bmpTemp.bmHeight, m_pDrawText.GetAt(i + 1), sizeof(m_pDrawText.GetAt(i + 1)) + 1);
287287 // dcBmpTemp.TextOut(500, 420, _T("Johnny Carson"), 13);
288288 pDC->SetTextColor (RGB (255 , 0 , 0 ));
289- pDC->TextOut ((bmpTemp.bmWidth +1 )*i, (bmpTemp.bmHeight +20 )*2 +3 , m_pDrawText.GetAt (i + 1 ), sizeof (m_pDrawText.GetAt (i + 1 )) + 1 );
289+ pDC->TextOut ((bmpTemp.bmWidth +1 )*i, (bmpTemp.bmHeight +20 )*2 +3 , m_pDrawText.GetAt (i + 1 ), _tcslen (m_pDrawText.GetAt (i + 1 )) );
290290 // 如果原图+效果图的 宽度和 大于窗口宽度 则申请更大的窗口
291291 if ( (bmpTemp.bmWidth +1 )*numPicture > m_nWindowWidth) {
292292 SetScrollSizes (MM_TEXT, CSize ((bmpTemp.bmWidth + 1 )*(numPicture-1 ), (bmpTemp.bmHeight + 20 )*2 + 30 )); // 窗口滚轮高度自适应
@@ -1375,7 +1375,7 @@ void CImageProcessView::OnFileOpen()
13751375 EntName = dlg.GetFileExt (); // 获取文件扩展名
13761376 EntName.MakeLower (); // 将文件扩展名转换为一个小写字符
13771377 m_pDrawText.RemoveAll ();// 清除
1378- m_pDrawText.Add (_T (" 原图 " ));
1378+ m_pDrawText.Add (_T (" 原图" ));
13791379 Invalidate (); // 调用该函数就会调用OnDraw重绘画图
13801380 }
13811381}
@@ -1678,9 +1678,9 @@ void CImageProcessView::OnHighboostFilter()
16781678 float *karr;
16791679 karr = commonl.SplitString (dlg.m_nHighBoostK , _T (" ," ));
16801680 // float karr[] = { 1, 2, 3, 4, 4.5, 5, 7, 9 };
1681- int karr_size = _msize (karr) / sizeof (float * );
1681+ int karr_size = _msize (karr) / sizeof (float );
16821682 m_pDrawText.RemoveAll ();// 清除
1683- m_pDrawText.Add (_T (" 原图 " ));
1683+ m_pDrawText.Add (_T (" 原图" ));
16841684 HighboostFilter (karr, karr_size); // k>1
16851685 }
16861686
@@ -1697,7 +1697,7 @@ void CImageProcessView::OnUnsharpMasking()
16971697 return ;
16981698 }
16991699 m_pDrawText.RemoveAll ();// 清除
1700- m_pDrawText.Add (_T (" 原图 " ));
1700+ m_pDrawText.Add (_T (" 原图" ));
17011701 float karr[] = { 1.0 };
17021702 HighboostFilter (karr, 1 );// k=1
17031703}
0 commit comments