Tag Archives: ImageAttributes

Make light pixels transparent in an image in C#

Recently I had an image and I wanted to make all of the light pixels transparent. Ideally I could simply make the white pixels transparent, but the image was scanned so few of the pixels were pure white. What I … Continue reading

Posted in graphics, image processing | Tagged , , , , , , , , , , , | Leave a comment

Apply a color threshold to an image in C#

The example Provide gamma correction for an image in C# uses the ImageAttribute object’s SetGamma method to gamma correct an image. This example uses the SetThreshold method to apply a color threshold to an image. The SetThreshold method takes as … Continue reading

Posted in drawing, graphics, image processing | Tagged , , , , , , , , , , | Leave a comment

Adjust image translucency in C#

The example Use an ImageAttributes object to adjust an image’s brightness in C# uses a ColorMatrix object to scale the red, green, and blue color components of an image’s pixels. You can use a similar technique to scale the pixels’ … Continue reading

Posted in drawing, graphics, image processing | Tagged , , , , , , , , , , , , , , , , | Leave a comment

Provide gamma correction for an image in C#

Gamma correction, or just gamma, is a nonlinear change to the red, green, and blue components of the pixels in an image. The post Use an ImageAttributes object to adjust an image’s brightness in C# explains how to use ImageAttributes … Continue reading

Posted in drawing, graphics, image processing | Tagged , , , , , , , , , , , | Leave a comment

Use a ColorMatrix to add a watermark to an image in C#

The example Add a watermark to an image in C# explains how to add a translucent watermark to an image. This example does the same thing in a slightly different and probably more efficient way. The example uses the following … Continue reading

Posted in graphics, image processing | Tagged , , , , , , , , , | 1 Comment

Rainbowize an image in C#

This example extends the post Use an ImageAttributes object to apply general color tones to an image in C# to rainbowize an image. It chops an image into pieces and then uses the previous example’s techniques to convert the pieces … Continue reading

Posted in graphics, image processing | Tagged , , , , , , , , , , , | Leave a comment

Use an ImageAttributes object to apply general color tones to an image in C#

This example uses techniques similar to those described in the post Use an ImageAttributes object to convert an image to shades of red, green, or blue in C# to apply general color tones to an image. It generalizes those techniques … Continue reading

Posted in graphics, image processing | Tagged , , , , , , , , , , , , , | 2 Comments

Use an ImageAttributes object to convert an image to shades of red, green, or blue in C#

This example uses the techniques described by Use an ImageAttributes object to adjust an image’s brightness in C# to convert an image to shades of red, green, or blue. The previous example scaled each pixel’s red, green, and blue color … Continue reading

Posted in graphics, image processing | Tagged , , , , , , , , , , , , , | 1 Comment

Use an ImageAttributes object to convert an image to sepia tone in C#

This example modified the previous example Use an ImageAttributes object to convert an image to monochrome in C# to convert an image to sepia tone. This example uses a ColorMatrix that gives the resulting pixel’s color components different values that … Continue reading

Posted in graphics, image processing | Tagged , , , , , , , , , , , , , , , | Leave a comment

Use an ImageAttributes object to convert an image to monochrome in C#

This example shows a quick and easy way to convert an image to monochrome. The example Quickly convert an image to grayscale in C# shows one way to convert an image to grayscale. It does that buy looping through the … Continue reading

Posted in graphics, image processing | Tagged , , , , , , , , , , , , , | 1 Comment