Image Filter art --- LOMO Filter, --- lomofilter

Source: Internet
Author: User
Tags image filter

Image Filter art --- LOMO Filter, --- lomofilter

LOMO Filter
LOMO is a concept that emphasizes feelings, opportunities, and weakens photography techniques. Uncertainty and randomness are the biggest characteristics of LOMO. LOMO originated from Lomography, the LOMO camera, which was originally a product of the Soviet Union and was manufactured by the Leningrad optical and mechanical alliance in 1980. It is a dumb camera created for the public's needs. Common lomo photo compositions have no rules, rich colors, inaccurate focus, inaccurate exposure, and shaking paste. LOMO has a variety of styles. This article briefly introduces a style. The specific Algorithm Implementation is as follows: 1. Use the "soft light" layer to mix source image A with source image. The formula is as follows: private int ModeSmoothLight (int basePixel, int mixPixel) {int res = 0; res = mixPixel> 128? (Int) (float) basePixel + (float) mixPixel-255.0f) * (Math. sqrt (float) basePixel/255.0f) * 255.0f-(float) basePixel)/255.0f): (int) (float) basePixel + (float) mixPixel + (float) mixPixel-255.0f) * (float) basePixel-(float) basePixel * (float) basePixel/255.0f)/255.0f); return Math. min (255, Math. max (0, res);} 2, B mixed with a style color set by yourself (such as blue: R-200, G-37, B-11, set the 40% transparency to Figure C. The formula is as follows: private int ModeExclude (int basePixel, int mixPixel) {int res = 0; res = (mixPixel + basePixel) -mixPixel * basePixel/128; return Math. min (255, Math. max (0, res);} 3, select a dark corner template and mix it with C to achieve the final LOMO effect. Of course, if you do not like the Bitmap effect, skip this step. The core code is private Bitmap LOMOFilterProcess (Bitmap src) {Bitmap srcBitmap = new Bitmap (src ); bitmap dst = new Bitmap (src); int w = dst. width; int h = dst. height; BitmapData dstData = dst. lockBits (new Rectangle (0, 0, w, h), ImageLockMode. readWrite, PixelFormat. format32bppArgb); BitmapData srcData = srcBitmap. lockBits (new Rectangle (0, 0, w, h), ImageLockMode. readOnly, PixelFormat. format32bppArgb); byte * pSrc = (byte *) srcData. scan0; byte * pDst = (byte *) dstData. scan0; int offset = dstData. stride-w * 4; int r, g, B; for (int j = 0; j

Source image

LOMO Filter

Finally, put a complete C # DEMO download link: http://www.zealpixel.com/thread-66-1-1.html

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.