Image processing doesn’t always have to do with scientific computing. Image processing techniques can easily be applied to create artistic filters capable of producing art that would be impossible or difficult for a human to recreate by hand. Previously, I wrote about an algorithm that can make an image look like an oil painting. In this article, I’ll be discussing an algorithm that can be used to roughly simulate what an image would look like if it were in stained glass. Continue reading ‘Stained Glass Algorithm’ »
Posts tagged ‘GDI’
Image convolution is the most vital image processing algorithm available. Using simple 2-D convolution, you can blur, sharpen, emboss, and even detect edges in an image. Not only is convolution so powerful, but it is also very easy to perform. Simply put, the value of a modified pixel is determined solely by it’s original value summed up with weighted values of it’s neighboring pixels. After the weighted sum is completed, a division takes place to normalize the value of the pixel, usually so that the brightness of the image remains the same. Sometimes, an offset can be added after the normalization for certain effects. Continue reading ‘Image Convolution with GDI+’ »
Understanding how to use LockBits is essential for creating high performance GDI+ applications. Usually, GDI+ is thought of as a low performance graphics API. While arguments can be made for this, if you use GDI+ properly, you can achieve great performance. Continue reading ‘Using LockBits in GDI+’ »
[Updated 6-23-2025] Over a decade ago, this was written to show how to load a JPG with C++ using GDI+. However, GDI+ is effectively obsolete, and so this article will show you another, more platform independent way to load a JPG (or JPEG), PNG, BMP, TGA, HDR in a very short amount of time, and also how to modify the image data and write an image file to disk.
Continue reading ‘How to load a JPG with C++’ »This tutorial will focus on how to create and compile an application that uses GDI+. We will be starting a project from scratch using Microsoft Visual Studio. GDI+ is a powerful, object oriented API for doing mostly 2D graphics. Unlike GDI, GDI+ is generally much easier to use, much more difficult to misuse, and in many cases can produce higher quality images than GDI. While GDI+ is considered slower than GDI, it is still perfectly acceptable for most applications. Continue reading ‘Getting started with GDI+ in Visual Studio’ »