我使用C++編寫,gdi 我使用stretchDIBits將圖像繪製到直流。如何提高DrawDIB的質量?
::SetStretchBltMode(hDC, HALFTONE);
::StretchDIBits(
hDC,
des.left,des.top,des.right - des.left,des.bottom - des.top,
0, 0,
img.getWidth(),
img.getHeight(),
(img.accessPixels()),
(img.getInfo()),
DIB_RGB_COLORS,
SRCCOPY
);
但是它很慢。 所以我改爲使用DrawDib函數。
::SetStretchBltMode(hDC, HALFTONE);
DrawDibDraw(
hdd,
hDC,
des.left,des.top,des.right - des.left,des.bottom - des.top,
(LPBITMAPINFOHEADER)(img.getInfo()),
(img.accessPixels()),
0, 0,
img.getWidth(),
img.getHeight(),
DDF_HALFTONE
);
然而,結果就像COLORONCOLOR模式繪製。 如何提高圖紙質量?
的`DrawDib`的東西是非常過時的。你能解釋一下你的意思嗎?你是否試圖在實時視頻中做到這一點?你是否試圖將它應用於非常大的圖像?需要多少時間,你需要多快? – 2009-11-09 17:12:31