This C# Tutorial explains "How to edit any image or picture in C#?". This application will change Image colors by using System.Drawing.Imaging; Library. Apply general color tones to an image in this application. You can Download this application with its visual studio files.
Image Attributes in C#
In this application use the scroll bars to select a target color. Moving the image’s colors towards the target color may change the image’s overall brightness, so the program also includes a brightness scroll bar you can use to adjust the result. The code divides the brightness value by 128 to get a brightness scaling factor. The scroll bar can tackle values between 0 and 255 so this scale factor ranged between 0 and roughly 2. Next the program takes the red, green and blue components of the target color and divides them by 255 to get a value between 0 and 1. It then scales the results by the brightness scale factor. The program plugs the resulting color component scale factors into the ColorMatrix. Having created the ColorMatrix object, the code creates an ImageAttributes object and uses it to draw the image. This method is extremely fast so you can drag the scroll bars back and forth to change the result in real time. This gives a sense of how fast drawing with an ImageAttributes object is.
Source Code:
Check Its source Code
Output
Check Output Video
Download:
Download this application in with visual studio files.
Sajjad! if you have put an option for selecting an image from computer to edit it, it would have helped alot.
i will work on this app after my exams. :p
Thanks Buddy. Can you give me code of putting frame on image which we are trying to edit ?
you can create your own Photoshop application this way . by the way thanks for this. Can u give me same code for asp.net ?
Awesome. plz create a setup of this application so i can use it for my facebook profile pictures upload.