Image Filter art-nostalgia style filter, filter-nostalgia Style
This article introduces the code implementation of a special filter effect. The filter effect is not much worse than the filter effect of the old photos we introduced earlier, in fact, old photos not only have a nostalgic style, but also have more traces of nostalgia, such as photo folds and cracks. The nostalgic style is just a yellow color style. The following code shows a nostalgic style: private Bitmap FilterProcess (Bitmap a) {Bitmap srcBitmap = new Bitmap (a); int w = srcBitmap. width; int h = srcBitmap. height; System. drawing. imaging. bitmapData srcData = srcBitmap. lockBits (new Rectangle (0, 0, w, h), System. drawing. imaging. imageLockMode. readWrite, System. drawing. imaging. pixelFormat. format32bppArgb); byte * pSrc = (byte *) srcData. scan0; int offset = srcData. stride-w * 4; int B = 0, g = 0, r = 0, gray = 0; for (int j = 0; j Source image Nostalgic style Effect Finally, give a complete program DEMO download link: http://www.zealpixel.com/thread-77-1-1.html The DEMO contains the C #/C language interface implementation. I hope you will like it! |
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.