Recent news
How much traffic do you get from a viral YouTube video?
Last month, the team from Realm Pictures built an incredibly clever “interactive real-life first-person shooter” that strangers could play over Chatroulette, Omegle, and Skype. In the behind-the-scenes video, they talk about how they pulled off the feat, and it’s an impressive example of unifying a bunch of different technology to accomplish something novel.Site overhaul coming - apologies for broken links and other bugs
tl;dr: Mobilegeddon (who thinks up these names?) has finally provided the kick I need to get this site overhauled. Apologies in advance for things like messed up formatting and randomly broken links.Simple algorithms for adjusting image temperature and tint
I've already talked at length about converting a temperature (in Kelvin) to an RGB triplet. But what if you simply want to adjust an image's temperature, without caring about the specifics of it? This article is for you. As a bonus, source code is also provided for tint adjustments.PhotoDemon 6.2 beta live - testers welcome!
The latest version of PhotoDemon includes an overhauled interface, cool new tools (like Content-Aware resize), WebP and JPEG-XR support, and so much more.PhotoDemon 6.0 is now live at photodemon.org
After a successful (and relatively bug-free!) beta testing session, PhotoDemon 6.0 is ready for you to download.PhotoDemon 6.0 beta is live
It's taken nearly six months, but PhotoDemon 6.0 is finally ready for release. I've already talked about some of the great features this release includes, like powerful selection tools, EXIF and other metadata support, Curves and other new tools, so I'd recommend glancing through the linked article if you're curious. Since that article was written, a number of other features have been added or improved...Blur Filter performance: PhotoDemon vs GIMP vs Paint.NET
The latest nightly build of PhotoDemon includes a bunch of new and improved blur filters. I thought it would be fun to speed-test four of its improved blur tools against two other free photo editors - GIMP and Paint.NET. The results were surprising enough that I thought them worth sharing...How to compile zLib 1.2.8 (WINAPI / WAPI / STDCALL version)
This is not a full-blown article - just a quick HOWTO for people who require the latest version of zLib and want to use it from a language (like classic VB) that requires a standard WinAPI interface. You must compile zLib yourself using the free 2012 version of Visual Studio Express...PhotoDemon 6.0 preview and progress report
The next version of PhotoDemon is getting better and better, and while it's not quite ready for an official beta release, I thought it would be fun to share some of its big new features, including Italian language support, state-of-the-art Selection tools, metadata (EXIF) support, a new curves tool, photograph perspective correction, digital Wratten filters, and much more...PhotoDemon 5.4.1 is now live
PhotoDemon 5.4.1 provides fixes for several issues found in version 5.4 (released two days ago). If you have automatic updates enabled, the software will notify you of this update. The list of fixes includes...PhotoDemon 5.4 is live - now with German, French, and Dutch language support
PhotoDemon 5.4 is complete. New features include language support (German, French, and Dutch), a full-featured batch processing wizard, shadow/highlight correction, nine new distort tools, vignetting, median noise removal, JPEG and PNG optimization, and more.PhotoDemon 5.4 Beta Now Available
Another PhotoDemon update is nearing completion, and I need help testing it. Download a free copy, give it a spin, and let me know what you think. Lots of new features in this release, including French, German, and Dutch language support, distortion tools, upgraded Blur and Sharpen tools (including a new Smart Blur), JPEG/PNG optimization, and more.Coming to PhotoDemon 5.4: Language Support. Translators welcome!
The next PhotoDemon release (5.4) will include support for multiple languages, with French, German, and Dutch (Vlaams) officially supported at release. I would love to include official support for additional languages. If you are fluent in a language other than English, please consider contributing a new translation!A simple algorithm for correcting lens distortion
One of the new features in the development branch of my open-source photo editor is a simple tool for correcting lens distortion. I thought I’d share the algorithm I use, in case others find it useful. (There are very few useful examples of lens correction on the Internet - most articles simply refer to existing software packages, rather than explaining how the software works.)Hooking modern Windows common dialogs: some notes
I've been investigating common dialog hooking for PhotoDemon, as it would allow me to add support for image previewing right in the dialog itself. This isn't as necessary in modern versions of Windows (7 in particular includes very good image format support), but it can be helpful for unsupported formats like RAW photographs. Unfortunately, several days of research have shown that it is not possible to hook a Vista or Windows 7 style dialog and maintain the modern layout...Image Dithering: Eleven Algorithms and Source Code
Dithering is still a surprisingly applicable technique, not just for practical reasons (such as preparing a full-color image for output on a non-color printer), but for artistic reasons as well. Dithering also has applications in web design, where it is a useful technique for reducing images with high color counts to lower color counts, reducing file size (and bandwidth) without harming quality. It also has uses when reducing 48 or 64bpp RAW-format digital photos to 24bpp RGB for editing.Announcing PhotoDemon 5.2 - Selections, HSL, Rotation, HDR, and More
PhotoDemon v5.2 is now available. New features include selection tools, arbitrary rotation, HSL adjustments, CMY/K rechanneling, many new user preferences, multiple monitor support, and more...Announcing PhotoDemon 5.2 Beta 1 - Testers Needed!
Another PhotoDemon update is nearing completion, which means it's time for you to try and break it. Download a free copy of PhotoDemon today, give it a spin, and let me know what you think.Announcing PhotoDemon 5.0 - Everything is Faster, Everything is Better
PhotoDemon v5.0 is now available. It's the biggest update PhotoDemon has seen in years, and it's awesome.How to Convert Temperature (K) to RGB: Algorithm and Sample Code
While working on a "Color Temperature" tool for PhotoDemon, I spent an evening trying to track down a simple, straightforward algorithm for converting between temperature (in Kelvin) and RGB values. This seemed like an easy algorithm to find, since many photo editors provide tools for correcting an image's color temperature in post-production, and every modern camera - including smartphones - provides a way to adjust white balance based on the lighting conditions of a shot. Who knew that no one on the Internet had ever devised such a thing?Announcing PhotoDemon 5.0 Beta 1 - Testers Needed!
PhotoDemon's biggest update in years is nearing completion, which means it's time for you to try and break it.Announcing PhotoDemon 4.4 - Now With Update Notifications, Improved Histogram, and More
PhotoDemon version 4.4 is now available. Updates in this version include an all-new automatic update notifier. Helpful Undo/Redo text that describes what you are about to Undo/Redo. A redesigned histogram, including per-channel rendering, logarithmic histograms, a new interface, and no more modal-window locking. A new grayscale conversion interface, including two new algorithms and real-time previews. And the usual batch of bugfixes and optimizations.Announcing PhotoDemon: A Fast, Free, Open-Source Photo Editor and Image Processor
I've spent 12 years working on an advanced image processing program. The software is now available under the title "PhotoDemon." It is fast, free, completely open-source (BSD licensed), and it provides a number of useful features, including macro recording and automated batch conversion. It's completely portable - meaning it doesn't require installation - and it has no external dependencies. I'd love to get your feedback on it.How to use a scanner (or TWAIN-compatible digital camera) in VB6
Today's project demonstrates how to implement full scanner support from within a VB6 project. As a bonus, it also provides support for TWAIN-compatible digital cameras. The public-domain EZTW32 library is used, and a full sample project is available for download...Support Linux by Not Writing Linux-Only Software
I sometimes see Linux users complain because their favorite Linux-only project decides to go cross-platform. Decide to provide a Windows downloader for your project, and you can bet the trolls will come calling. "You're betraying Linux," they'll claim. "I refuse to support you now!" Please, developers - ignore these people.How to Access Science and Medical Research without Paying an Arm and a Leg for It
There are many ways to legally access medical research without paying ridiculous per-paper access fees. I've learned about these strategies over years of tracking down papers for work purposes. This article should help those researching medical issues find information they need without spending thousands of dollars to do it.Seven grayscale conversion algorithms (with pseudocode and VB6 source code)
I have uploaded many image processing demonstrations over the years, but today's project - grayscale conversion techniques - is actually the image processing technique that generates the most email queries for me.Real-time Diffuse (Spread) Image Filter
A software-based "diffuse filter" - random displacement of image pixels within a specified radius - was used in a number of SNES, Genesis, and DOS games to simulate an explosion effect. Today's project provides the source code for generating a diffuse effect in real-time.How to Colorize an Image (in VB6)
"Colorization" in image processing can refer to one of several things. One form of "colorization" is taking any image - including full-color ones - and applying a uniform color for dramatic or artistic effect. This is the type of colorization filter provided by software like Photoshop and GIMP, and it's also the effect this project implements.Look for my photography in Mandriva 2010.2
Thank you to the Mandriva team for naming one of my photos a winner in their “community background contest.” For those interested, the following photo will be available as a background in the mandriva-theme-extra package of Mandriva 2010.2:Rendering images from random lines (and shapes)
I wanted to title this article "a novel method for matrix randomization using polygons and custom differential post-processing blending"... but that was a bit long, even for me...Emboss / Engrave / Relief image filters
Basic emboss and engrave filters are two of the simplest image processing features to implement. Both operate on the same principle - for each pixel, subtract the RGB values of one or more neighboring pixels in a particular direction. This leads to an image where low-contrast areas are all black, while high-contrast areas (edges) are varying colors of brighter intensity.Some Nokia N900 Photography
Now that Utah weather is FINALLY improving, my wife and I were finally able to take a road trip out to Red Butte Garden. All photos here were taken with my Nokia N900. The phone has a 5mp sensor, but these were all taken at the 3.5mp setting (widescreen). Not bad for a phone, eh?Drawing the Mandelbrot Set / Fractal (in VB6)
Today's very cool project demonstrates a proof of concept implementation for rendering the famed Mandelbrot set (or "Mandelbrot fractal") using VB6. It's a bit of a feat, since VB6 isn't exactly optimized for recursion-heavy calculations...but you know me. I love making VB do things it was never meant to do...Artificial Life Simulator (in VB6)
Here you have it: the largest, most complex programming project now available on tannerhelland.com. Originally a final project for a university bioinformatics course, this artificial life simulator has now been completely retooled as a full-blown lesson in evolution and population genetics. As with most artificial life simulators, a set of simple artificial creatures compete for limited resources. Each creature has a strand of pseudo-DNA that determines three basic attributes: size, speed, and range (how far it can see)...Hidden Markov Models, the Viterbi Algorithm, and CpG Islands
Today's project is something new to this site - bioinformatics code! I feel a tad ridiculous that it's taken me so many years to post code related to my field, but hey - better late than never. Read on to discover the awesomeness of Hidden Markov models, the Viterbi algorithm (also known as Viterbi paths), CpG islands, and how these all work together to help scientists locate genes.Sepia / “Antique” Image Effect
I'm guessing you've seen this style of image before - a sort of pseudo-antique filter than can make any image look like it was taken with a very old camera. There are many ways to programmatically generate images like this.Affirmations of the New Skepticism
Paul Kurtz - better known as the "father of skeptical humanism" - wrote the following affirmations for the back cover of the May/June 2009 issue of Skeptical Inquirer. Though I find some of the terminology less-than-perfect (particularly "believe", which would read better as "affirm" or "assert"), the overall message is thought-provoking and worth a read.Nature-Inspired Image Filters
Today's article brings a collection of random image effects that can be quickly (and programmatically) generated. In an attempt to give the project some coherency, I've named each effect after something "nature-themed" so as to help distinguish them. As always, full source code and a sample .exe is provided...Custom Image Convolution Filters
The ability to create custom convolution filters is a mainstay of modern photo editors. A robust matrix-based filter engine can be used to create many unique image effects by simply manipulating the matrices you supply to the engine. In this project, I've provided a 5x5 custom filter engine with support for both scaling and biasing. This is roughly identical to the custom filter engine provided by Photoshop...Basic Image Edge Detection
Edge detection (also called "boundary detection") is a fundamental problem in image processing. The ability to accurately detect visible "edges" in an image makes possible everything from OCR to silly Instagram effects. In this project, I've implemented six well-known edge detection algorithms.Study Shows Children Ruin Marriage (probably)
Today’s post is a little different from my usual fare, but I think it’s something others may find useful.Image Histograms - Part 2 – Stretching and Equalizing
As promised, here is the second half of my image histogram project. In this project, I'll show you how to stretch a histogram, equalize individual channels, and - most useful of all - equalize an image's overall luminance.Image Histograms – Part 1
Today's project demonstrates how to quickly and efficiently generate an image histogram. Histograms are invaluable for understanding and implementing a multitude of image processing techniques - including brightness, contrast, levels, curves, equalizing, and more - so it's worth taking some time to experiment with them.Code for Filling Image Regions
This little program demonstrates two key graphics programming principles: 1) simple "painting" code - basically, connecting a series of lines together as the user drags their mouse around, and 2) an implementation of a built-in Windows function for filling a contiguous region of an image. (Photoshop users will know this as the "paint bucket" tool.)Rendering fire programmatically
This sample project demonstrates a simple way to programmatically render fire. No pre-built images or palettes are used, making the code extremely lightweight and portable. Both flame coloring and generation can be done using simple math...Linux vs. Windows Hardware Support: The Truth
If you’ve heard of Linux, you’ve probably also heard the following comment (or something like it):Basic Game Physics (Velocity and Acceleration)
This simple program demonstrates a rudimentary implementation of physics for a 2D flight simulator. Use the arrow keys to fly a spaceship (taken from the classic game Raptor) in all 4 directions and use spacebar to fire two "lasers."Manual Image Blending/Transparency
Real-time transparency has become so commonplace in modern games and PC applications that it’s almost taken for granted. However, the specific formula that performs this now-ubiquitous effect is worth understanding.Color Shifting (a cheap way to triple graphics variety)
Color shifting is a very fast, very simple effect that can greatly simplify the work of game artists.Real-time Blacklight Effect
Here's an example of a simulated blacklight effect that looks great on any image with people in it.Real-time Image Levels (input/output/midtone)
When this code was first written, it was (as far as I knew) the first non-GPL open-source implementation of a real-time image level adjustment. There have since been many other implementations (including a much more powerful version in my own PhotoDemon photo editor), but I believe this first version still demonstrates a nice, simple, Photoshop-equivalent approach to the problem.Real-time Image Curves (using cubic splines)
Adjusting an image's colors using a "curves" dialog should be familiar to any PhotoShop users out there. Curves is similar in theory to both "Image Levels" and normal gamma correction, but it provides a much more powerful interface for adjusting an image's luminance and color balance.Building a simple 2D tile-based map editor
Who doesn't love a classic tile-based game? This demo is largely self-explanatory - click on the tile bar at the top (with either the left or right mouse button) to select a tile, then click on the large center window to draw that tile onto the map. Scrolling and zoom are fully implemented, as are saving and loading map files.Smooth linear color gradients
This program demonstrates how to create a smooth color gradient between any two colors.Real-time image contrast
Contrast is a fundamentally simple image adjustment. Increasing contrast pushes color values away from gray, while reducing contrast pushes color values toward gray. This sample project demonstrates a simple lookup-table based approach that produces fast, excellent results.How to capture the screen in VB6
There are multiple ways to capture the screen in VB6. I recommend the following method for several reasons:VB Graphics Programming: Part 4 (Optimizations Checklist)
This last section of my graphics programming tutorials takes a different approach from the previous three sections. Instead of discussing specific graphics routines, I’m going to give you my “Top 10 List of Graphics Code Optimizations.” This checklist of optimization techniques will provide a simple, straightforward mechanism for speeding up your graphics application. We’ll start with the easiest ways to speed up your code and end with the most dramatic (but effective) ways. My hope is that you can take slow graphics-related code, adjust it according to this checklist, and end up with a much faster version with minimal impact to code readability or complexity.VB Graphics Programming: Part 3 (Advanced API)
Advanced API Pixel RoutinesVB Graphics Programming: Part 2 (Beginning API)
Basic API Pixel Routines Next, let’s discuss the basics of per-pixel graphics programming using the simple API routines of GetPixel and SetPixel/SetPixelV. If you haven’t already, I recommend reading the previous page, “Pure VB Pixel Routines,” as it provides the foundation for the advanced graphics principles discussed in this and the next two sections.VB Graphics Programming: Part 1 (Pure VB)
Pure VB Pixel RoutinesVB Graphics Programming: An Introduction
To any VB 6.0 users still out there: