如何进行简单的有序抖动算法 (半色调图像)?
代码说明:
翻译 maninwest@Codeforge 作者:Mr. Lai Tai-Yu@CodeProject我们常在报纸上看到图片。观察这样的图片你会发现它是由一个个点组成的。我们也可以做出这种效果。很有趣。适用于初学者。背景操作系统: Microsoft Windows 7 专业版 (64 位) 开发实用程序: Microsoft Visual Studio 2010使用代码 // The height of the image. for ( int iY = 0; iY < imageA->DibInfo->bmiHeader.biHeight; iY++ ) { // The height of the image. for ( int iX = 0; iX < imageA->DibInfo->bmiHeader.biWidth; iX++ ) { // The index of pixel, because we use the three depth bit to present one pixel of color, // Therefore, we have to multiply three. lIDXA = ( iX * 3 ) + ( iY * imageA->DibInfo->bmiHeader.biWidth * 3 ); // To get the pixel depth of the blue channel, byteRGB_BA = imageA->DibArr
下载说明:请别用迅雷下载,失败请重下,重下不扣分!