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.
I first threw together tannerhelland.com on WordPress 2.0. To give you an idea of what life was like back then (2006), the release notes for WP 2.0 included such amazing features as “rich editing” and “image uploading”. Be still my soul.
At the time, I was looking to move from a custom-built blog engine to something a little more maintenance-free. I was experimenting with PHP for the first time, and as part of preparing for “Web 2.0”, it seemed like a good language to know. (Aren’t buzzwords like “Web 2.0” hilarious in retrospect?) So I hacked together a Frankenstein WP theme, and added a bunch of custom code to handle my typical blog posts, including automated download links for things like code samples and music.
In the years since, those custom code bits have come back to haunt me, especially with the underlying code being written by a PHP beginner. I can’t easily move to a new platform without dealing with my various custom link and formatting generators, and I keep putting off the task because I don’t want the headache of fixing my old code.
But last week, I got a notification that the site had passed a million pageviews, which was kind of a fun symbolic mark… but also a reminder of “oh crap I am still terrible at this blog thing,” as evidenced by a full year passing since I’ve posted anything new. This is unfortunate, as I’ve been doing a lot of neat work on my open-source photo editor, the kind of work I think would be helpful to talk about in more detail. My latest project is parsing font files and converting glyphs to standard Windows GraphicsPath objects, which has been both fun and terrifying, and if my adventures could save some other poor soul the time and effort of reverse-engineering Stygian APIs like Uniscribe, I’d love to write more about it.
Anyway, all this, combined with the need for a responsive site design, has motivated me to finally deal with my terrible old WordPress code. There’s no easy way to do this, and I’ve coded long enough to know that things are going to break no matter how much testing I do, so thanks in advance for your patience with a semi-working site over the next few weeks.
I hope the end result is a much simpler, mobile-friendly site design, and even fewer barriers standing in my way of talking about weird (and hopefully interesting) new projects. In the meantime, if you need to download a code sample or mp3 or anything else but the link is broken, you can let me know from the PhotoDemon contact page (which won’t be affected by the current overhaul).
Since that article, a number of other features have been added or improved:
All tools now support save/load presets, reset to default, randomize, and automatic save/load of last-used settings. These items are all accessible from a new “command bar” at the bottom of each tool dialog.
This 6.0 release represents six months of hard work from a variety of contributors. While I am very grateful to all of PhotoDemon’s talented contributors, a few deserve special mention. Thank you to:
Audioglider for contributing three new tools: Channel Mixer, Vibrance, and Exposure. Audioglider also reported a number of issues, and motivated me to implement preset support for every PD tool.
Frank Donckers for again providing the German, French, and Dutch translations, and for contributing many pieces of code to the new Language Editor, including the Google Translate interface. Amazing stuff.
GioRock for the Italian translation, and for detailed testing of many small translation items. It takes a ton of work to get all of PD’s text translating properly, and GioRock debugged many items for me, which benefits users of every language.
Kroc Camen for a new IDE-safe mouse interface class, derived from his own open-source VB project. Kroc also reviews many of PD’s individual commits, where he catches many small items I overlook.
Robert Rayment for helping me profile and optimize a number of PD’s more taxing functions, and for many suggestions on tweaks and improvements. Many of the performance improvements available in this new version are a result of Robert’s help. Please check out his own VB image editor if you can.
EXIF data is not maintained with certain combinations of preferences (delay loading EXIF + export full data when saving). This is caused by a metadata caching issue, and will be fixed by release. Fixed!
ExifTool plugin is slightly out of date. It will be updated to its latest version upon 6.0’s release. Fixed!
Metadata menus sometimes become disabled even when metadata is available. This will be fixed by release. Fixed!
OK and Cancel buttons are not currently translated. This will be fixed by release. Fixed!
Some hotkeys don’t fire unless the main form is first clicked. This is a known problem with VB, and will hopefully be fixed by release. Fixed!
Master language file is missing a few minor text entries. This will be fixed by release.
The beta version was released before these small items were fixed, so it still contains these bugs. Developers can download updated source code, with these fixes, from GitHub.
Official release timeline
Barring any major bugs, the official 6.0 release should happen within several weeks. Feature-wise, it will be identical to this beta release. The only changes will be minor bug fixes and performance improvements. Automatic update notifications for existing PhotoDemon installs will also go live at that point.
It’s been awhile since I posted any news on PhotoDemon, but not because work has slowed – just the opposite, in fact! The development version of PD is cranking ahead full-steam, and thanks to a number of outside contributors, the next version will include a wider set of improvements than any previous version. There’s still quite a bit of testing and fine-tuning to do, so this article does not include a downloadable beta release – rather, the article is meant to serve as a preview of the upcoming 6.0 release and all the cool new features it provides. (Of course, developers or anyone with access to Visual Basic 6.0 can compile the latest version themselves by visiting PhotoDemon’s GitHub page. New testers and contributors are always welcome!)
First, an explanation on why the next PhotoDemon release will be version 6.0 instead of the expected 5.6. The next release will break backward compatibility with a number of PhotoDemon files, including any saved macros or filters. This break is necessary to implement a large overhaul of PhotoDemon’s internals – an overhaul that makes the program faster, smaller, more stable, and much easier to develop and maintain. The goal is to have all of PhotoDemon’s specialized file formats (including macros) use XML for storage. This allows both users and other software developers to read and edit PhotoDemon files from any general-purpose text editor. This change will also make it much easier to add new macro features without breaking old macro files. (The current macro format was developed over a decade ago, when the program was only meant for personal use, and it is extremely flimsy and difficult to extend – hence the need for a redesign.)
The downside of this change is that any current macros will need to be re-recorded in version 6.0, as version 4.X and 5.X macros will no longer be supported. I apologize for this inconvenience, and I promise to do my best to avoid breaking backward compatibility in the future.
The 6.0 release will also include important interface changes – such as a redesigned main menu and tool window – further supporting the switch to a new major version number, and for developers, the program’s central action processor has been redesigned from the ground up, making it easier than ever to get involved in development.
So with that out of the way, let’s talk about the good stuff, namely: what’s coming in 6.0? Here is a list of features and updates that are already finished and available in the current development build (again, downloadable at https://github.com/tannerhelland/PhotoDemon).
Italian language support
Courtesy of talented contributor GioRock is a new Italian language option for PhotoDemon. Many thanks to GioRock for this huge contribution.
Other internationalization improvements
With the help of GioRock and Frank Donckers (you may remember Frank as the brilliant developer behind PhotoDemon’s language translation engine), a number of other improvements are now available for international PhotoDemon users:
The comma “,” is now supported as a decimal separator in all tools. Previously, use of a comma could lead to critical errors.
Translated text is now automatically resized if it is larger than its tool window. This helps text in verbose languages remain fully readable.
Translations that span multiple lines (such as long tooltips) are now automatically handled by the program. This reduces the burden on translators to manually fit translated text longer than its English equivalent.
New feature: advanced selection tools
PhotoDemon 6.0 includes a completely redesigned selection tool engine. At present, the following dedicated selection tools are available:
Rectangular and Square selections (with optional rounded corners, including variable corner radii)
Elliptical and Circular selections
Line selections: unique to PhotoDemon, this tool allows you to select a line-shaped area, very helpful for things like tilt-shift effects (see below)
Each selection tool supports the following features:
Live selection coordinate and size display
On-canvas resizing by click-dragging nodes
Selections can be nudged or moved via text entry
Shift can be held to lock a 1:1 aspect ratio (e.g. squares or circles)
Live smoothing options: none, antialiased, or variable radius feathering (live feathering is only available on Windows 7)
Live selection types: interior, exterior, or bordered, with live border radius selection
In addition to these dedicated tools, a new Selection menu is available with additional selection-related features.
Select All and Select None
Invert Selection (switch selected and un-selected pixels, with full feathering support!)
Border selection, which takes the current selection and selects only its border
Feather and sharpen selection
Load and save selections
Thanks to the selection engine redesign, these features will automatically work with future selection tool implementations, including polygon/free-draw and “magic wand” selections.
Another huge improvement is integrating all selection actions into the Undo/Redo engine. If you create, move, resize, or apply any other action to a selection, you can now Undo/Redo that operation.
Selections are now fully integrated into the Record Macro tool.
Copy and Crop now support selections of any shape, making it trivial to crop circular or rounded-rectangle regions, or copy them for use in another program. (Feathered selections are automatically converted to 32bpp images, with the feathering applied in the alpha channel.)
Finally, the core Selection tools have been rewritten to use vector coordinates. This means that selections loaded from file are automatically resized to fit the current image, making them extremely useful for Batch Processing operations.
New image metadata (EXIF, XMP, IPTC) support
PhotoDemon now includes the marvelous ExifTool project as an optional plugin. ExifTool is the most comprehensive image metadata handler currently available, and PhotoDemon makes full use of its ability to handle every known type of image metadata, from the popular EXIF format (used in JPEGs) to obscure maker notes for all major DSLR brands.
A new integrated metadata browser automatically sorts metadata by category, and it allows the user to see actual or human-friendly metadata tags. The browser fully integrates with ExifTool’s multilanguage capabilities, sparing translators from any extra work!
When saving images, the Preferences manager now provides options for metadata embedding:
Unique to PhotoDemon is a privacy-centric metadata option, which aims to remove any personally identifying metadata entries, like serial numbers or GPS coordinates. By default, the “preserve all relevant metadata” option is recommended, which will remove any metadata not relevant to a file format (such as removing maker notes when saving RAW files to JPEG), but retain all other metadata entries. Metadata can also be fully stripped from exported files.
Also fun is a new Image -> Metadata -> Map GPS Coordinates option, which becomes available if an image contains GPS data. This option will automatically map the photo’s location in Google Maps.
New tools: too many to mention!
As always, the next release will include a host of new image editing tools. Here’s a small sampling of the latest additions to PhotoDemon’s repertoire:
For sake of brevity, I’ll forgo images of the rest of the new tools, namely:
Pan and zoom
Vibrance (developed by audioglider)
Other improvements and additions for end-users
Transparent images can now be copied/pasted between PhotoDemon and other software. This means you can take an image with multiple layers in GIMP and paste it into PhotoDemon fully composited.
Official RAW image format support; more than 20 RAW filetypes are now supported.
30-40% speed improvements to Gaussian Blur, Smart Blur, and Unsharp Masking thanks to an Integer-only rewrite of the blur engine.
Filters and other long-running actions can now be canceled mid-action by pressing ESC.
Revamped main window interface, as you can see in the screens above. The left-hand toolbar is now images-only, while the right-hand one has been expanded.
Better validation for all text controls. Invalid entries are automatically circled in red.
Alt+T will now let you switch between preview and non-preview modes in all tools.
Improvements and additions for developers and contributors
PhotoDemon can now provide timing reports for all actions passed through the central software processor. Simply enable the DISPLAY_TIMINGS constant when compiling.
New custom slider/text and up/down controls make it easy to utilize PD’s existing validation and translation abilities in your own tool dialogs.
A new string-based filter parameter class makes it easy to tie complex tools with many parameters into the software processor (and thus into recorded macros). No longer do you have to convert param lists to complex custom Variant embeddings.
PhotoDemon now includes a high-performance font rendering class, which makes custom font rendering (with AA) much easier to implement.
Dev builds, including build number, are now automatically detected by the program, making it easy to see which build you’re currently working with.
Support tools, including the custom plugin compressor and master translation file generator, are now synched to GitHub in the /Support subfolder.
A public histogram-generation routine is now available, so you can tap into PhotoDemon’s highly optimized histogram generator for any of your own tools.
Contributors, developers, and translators still welcome!
As always, PhotoDemon can never have enough external contributors, developers, and translators. If you can help with any aspect of the 6.0 release, don’t hesitate to get in touch. Many features in the 6.0 release wouldn’t be possible without outside help, and I’d love to add you to the ever-growing list of talented contributors that make PhotoDemon possible!
If you can’t contribute with coding or translations, donations are another great way to help. Thanks in advance for your small monetary contribution to this completely open-source project, which provides a full-featured photo editor (comprising 60,000 lines of code and more than 50,000 words of translated text in five languages) completely free of charge.
PhotoDemon 5.4.1 provides fixes for several issues found in version 5.4 (released two days ago). If you have automatic updates enabled, you will automatically be notified up the update, or you can manually download it here.
5.4.1 fixes the following bugs:
FIXED: Some controls do not display text correctly on Windows XP
FIXED: Some dialogs load very slowly when a translation is active
FIXED: Some edge detection methods fail to initiate when a translation is active
FIXED: Left-hand toolbox text formatting looks poor when a translation is active
FIXED: Tooltips not showing for picture box objects when a translation is active
FIXED: When the last-used folder in the batch process tool contains many images (1000+), the batch tool loads slowly on subsequent uses
FIXED: Minor typographical errors in translation files
This update also includes a few minor modifications and additions:
MODIFIED: In the batch process tool, when a selected image is removed from the batch list, its preview is now erased to prevent confusion
ADDED: further optimizations to translation engine. Program performance should now be much better while translations are active.
ADDED: batch process tool now displays the number of images in the current batch list
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. Download it here.
Highlight feature: support for multiple languages!
This is the biggest addition in version 5.4, and I can only claim partial credit for it. Primary credit goes to Frank Donckers, a fellow VB programmer who prototyped the initial translation engine for me. As if that isn’t incredible enough, Frank also supplied the translations for French, German, and Dutch (Flemish), so I owe him an enormous debt of gratitude. Thank you, Frank!
One of the neatest aspects of this feature is the ability to change the language at run-time via the Language menu. Unlike every program I have ever used, no restart is required. PhotoDemon will dynamically change the program’s entire language immediately, and if you change your mind, you can switch to any other language at any time.
I hope these three languages are only the beginning. If you speak a language other than English, please consider contributing a new PhotoDemon translation! No programming knowledge is required, and you will receive full credit for your work.Contact me for more details.
Nine new Distort-style tools
Add and remove lens distortion. Swirl. Ripple. Pinch and whirl. Waves. Kaleidoscope. Polar conversion (both directions). Figured glass (dents).
Vastly improved file format support
JPEGs now support automatic EXIF rotation on import, and a variety of options on export (Huffman table optimization, progressive scan, thumbnail embedding, specific subsampling). TIFFs support CMYK encoding and a number of compression schemes (none, PackBits, LZW, CCITT 3 and 4, zLib, and more). PNG exporting supports variable compression strength, interlacing, and background color chunk preservation. PPMs can be exported with RAW or ASCII encoding. BMP and TGA files now support RLE encoding. And for icons, animated GIFs, and multipage TIFFs, all images inside a file can now be loaded (instead of just the first one).
These format settings can be accessed from the Tools -> Options menu, and the new Batch Process tool also provides direct access.
Revamped standard tools, including Box Blur, Gaussian Blur, Smart Blur, and Unsharp Masking.
PhotoDemon is now a much better photo editor, thanks to the revamp of its core convolution filters. Larger tool dialogs make it easier to see the result of your actions. Better performance means real-time previews, even at enormous radii (up to 200px for all filters, plus 500px for box blur!). And all convolution algorithms now use specialized edge handling code to make sure every part of the image – from center to border – is handled correctly.
Also, the program’s Gaussian Blur is now a true gaussian blur. There are no shortcuts, no estimations, and it’s still fast enough to preview in real-time.
New advanced color tools, including Shadow/Midtone/Highlight adjustments, color balancing, and monochrome-to-grayscale recovery
New stylize tools, including Film Grain, Vignetting, Modern Art, Trace Contour, Film Noir, and Comic Book
Noise removal via Median Filtering
Automatic image cropping
New Batch Process Wizard
If I had to pick a personal “favorite” new feature in this release, it would be the brand-new batch processing wizard. This tool is a highlight of PhotoDemon’s emphasis on usability, and I researched more than a dozen other image batch processing tools while building it. I could be biased, but I believe PhotoDemon is now the best general-purpose image batch processor available on the web.
Drag-and-drop is now supported when building the list of images to be processed – not only from within the dialog, by dragging between list boxes, but also from Windows Explorer. Live previews make it much easier to find the images you want, while helpful instructions on the left-hand side expose some of the more nuanced functionality.
Page 2 is the barest page of the new wizard. The current version allows you to skip photo editing actions (if you want to just do a batch rename or format conversion, for example), or you can apply any recorded macro. In the next release, I will add a set of “one-click” presets for common actions, like resizing, or optimizing images for the web.
Page 3 asks you to choose an output format. If you want to retain original image formats, that’s cool too – PhotoDemon now supports this! Alternatively, you can select a single output format, with access to the program’s full range of detailed format settings. In the example above, you can see all the options available for JPEGs, including new support for optimization (lossless file size reduction), thumbnails, progressive encoding, and specific subsampling.
The final page asks you to select an output folder where PhotoDemon can save the processed images. New to this release is a wide range of renaming options – things like adding custom text to each filename, removing text from each filename, changing case, and replacing spaces with underscores for web-bound images. Additionally, original filenames can be retained, or PhotoDemon can just use ascending numbers.
So that’s the new batch wizard! I’d love feedback from power users, as there are a lot of moving parts to the batch tool, and while I have been very thorough in my own testing, it’s impossible to test every combination of variables. So if you find anything that doesn’t work, please let me know.
As is usual with each PhotoDemon update, a number of existing tools received redesigns or new features. Gamma correction now displays live gamma curves, and each color component (red, green, and blue) can be adjusted individually. Dilate and Erode use a new algorithm that’s significantly more optimized, meaning sizes up to 200px radius can be previewed in real-time. Monochrome conversion supports any two color (not just black and white), while the printing and histogram dialogs were completely overhauled to make them more user-friendly.
Universal color depth support at import and export time
PhotoDemon can now write 1, 4, 8, 24, and 32bpp variations of every supported file format. By default, when saving images, color depth detection is completely automated – the program will count the number of colors in an image and automatically select the most appropriate color depth for the output file. Alternatively, you can set a preference to manually specify color depth at save time. This also works for grayscale images; for example, the JPEG encoder will now detect grayscale images and write out 8bpp JPEGs accordingly. Alpha thresholding is also available when saving 32bpp images to 8bpp (e.g. PNG to GIF).
This feature was a nightmare to implement, as PhotoDemon supports a huge variety of file formats, and each one has a detailed list of color depths it does or does not support. Full support for transparency adds a whole other layer of complexity. But now that the feature is completely implemented and rigorously tested, I can’t imagine it any other way. Color depth is not something users should have to worry about, and automatic handling should be a feature of every photo editor (rather than pestering you for color depth every time you save… *cough* GIMP *cough*).
New feature: pngnq-s9 plugin for optimizing PNG files
At the request of a good friend, PhotoDemon now provides integrated support for the pngnq-s9 variety of the famous pngnq library. For the uninitiated, pngnq provides a way to reduce 32bpp PNG files to 8bpp while still preserving complex alpha channels, allowing for file size reductions of up to 75%. Pngnq provides superior results over other tools by using a neural network to reduce image colors, unlike the brute-force median cut algorithm used by software like pngquant. See here for a gallery of sample images if you’re curious.
Pngnq-s9 is a further improvement over stock pngnq, including cool features like YUV color space matching for better results, and the ability to preserve alpha values of 0 and 255. When saving 32bpp PNG files to 8bpp, PhotoDemon will now lean on pngnq-s9 to do the heavy lifting.
In the next version of PhotoDemon, pngnq-s9 support will be integrated into the batch process wizard as a new “optimize for web” option. For now, if you want to test out the feature, head to Tools -> Options -> Saving, and change the “set outgoing color depth” option to “ask me what color depth I want to use”. Then save a 32bpp PNG image to 8bpp and compare the file size.
New plugin manager and plugin downloader
Sometimes it makes sense for PhotoDemon to use an existing open-source project instead of me writing a new feature from scratch. These support libraries are included as “plugins”, and there are four of them in current version. Each one provides indispensable features (like scanner support) at a fraction of the cost involved to write such a feature from scratch.
Some of these plugins expose additional functionality, but it has always been a challenge for PhotoDemon to expose these additional features to the user. So the program now has a detailed plugin manager, where advanced users can change settings on a per-plugin basis, including activating or deactivating plugins as necessary. The manager also tracks availability and version numbers of each plugin.
Many canvas and interface improvements
Larger effect and tool previews. Persistent zoom-in/zoom-out buttons. Image URLs and files can now be directly pasted as new images. Improved drag/drop support, including drag/drop from common dialogs. New “Safe” save behavior to avoid overwriting original files. New Close All Images menu. New algorithms for auto-zoom when images are loaded, meaning much better results at all screen sizes. Tool and file panels can now be hidden. Higher-quality dynamic icons for the program, taskbar, child windows, and Recent Images list. Improved support for low screen resolutions.
Program-wide performance improvements
More aggressive memory management means lower resource usage. Program loading has been heavily streamlined, and now happens in less than a second on modern hardware. Image loading is much faster and more robust, including better support for damaged or incomplete image files.
More robust and comprehensive error handling
When loading multiple images, the program will now suppress warnings and failures (such as invalid files) until all images have been loaded. Many subclassing issues have been resolved – so no more surprise crashes! Overall this release should be extremely stable.
This release was a lot bigger than I’d like future releases to be. The biggest delay came from adding language support, as that affected every piece of text in every part of the program (nearly 10,000 words in total!). Now that language support is complete, I foresee future releases being much tidier and quicker.
A developer’s work is never done, and a roadmap for version 5.6 is already being worked on. Some features that didn’t make the cut for 5.4 – like improvements to the selection tool, or a “smart resize” option – were cut at the last minute, and they will be among the first features added to 5.6. The batch process wizard will see a number of additions, and I’d love to add some advanced multilanguage features, like a way for casual users to fix or adjust translations on-the-fly. I also think I’m finally ready to tackle the monumental task of writing a user manual… should be fun!
PhotoDemon 5.4 is nearing completion, and I need help testing it. Version 5.4 provides a bunch of new features, including French, German, and Dutch (Flemish) language support. If you can help translate PhotoDemon into another language, please let me know! The translation process is very simple, and it requires no programming experience or special software.
Version 5.4 also includes nine new distort tools, tons of new file format features including specialized PNG and JPEG optimization, improved memory management, a new plugin manager, real-time Gaussian, Smart, and Box blur tools with variable radius, a full Unsharp Mask tool, vignetting, median filtering, adding film grain, automatic cropping, contour tracing, a new Batch Wizard, redesigned tool interfaces, and more. Please download the beta and let me know if you find any bugs.
Remember – if you are an advanced user, you can always download the most recent development build of PhotoDemon’s source code from its GitHub page.
PhotoDemon is funded by donations from users like you. Please consider a small donation to fund development and to help me support my family. Even $1.00 helps. Thank you!
List of what’s new and improved in v5.4 (so far)
Official support for multiple languages. This is the biggest addition in version 5.4, and I can only claim partial credit for it. Primary credit goes to Frank Donckers, a fellow VB programmer and the one who prototyped the initial translation engine. Frank also supplied the translations for French, German, and Dutch (Flemish), so I owe him an enormous debt of gratitude.
Vastly improved file format support. JPEGs now support automatic EXIF rotation on import, and a variety of options on export (Huffman table optimization, progressive scan, thumbnail embedding, specific subsampling). TIFF exporting supports CMYK encoding and a number of compression schemes (none, PackBits, LZW, CCITT 3 and 4, zLib, and more). PNG exporting supports variable compression strength, interlacing, and background color chunk. PPM exporting supports RAW or ASCII encoding. BMP and TGA now support RLE encoding. For ICO files, all icons inside the file can now be loaded (instead of just the first one).
Nine new Distort-style tools. Add and remove lens distortion. Swirl. Ripple. Pinch and whirl. Waves. Kaleidoscope. Polar conversion (both directions). Figured glass (dents).
New and improved standard tools, including Box Blur, Gaussian Blur, Smart Blur, and Unsharp Masking. Each of these functions now supports variable radii (up to hundreds of pixels), and all have been heavily optimized. Gaussian Blur is the fastest VB-only true gaussian ever written. (Not a joke.)
Tons of new tools, including Film Grain, Color Balance, Vignetting, Autocrop, Median, Modern Art, Trace Contour, Shadow/Midtone/Highlight, Monochrome -> Grayscale conversion, Film Noir, and Comic Book. All tools include real-time previews. A number of existing tools received big updates as well – particularly Gamma Correction, Dilate, Erode, Monochrome Conversion, and Printing.
New Batch Process wizard. This replaces the old Batch Convert tool, which was an interface nightmare. The new tool supports a number of new features, including drag/drop support of batch lists, live image previews, and tons of file renaming options (prefix, suffix, case conversion, removing text, conversion of spaces to underscores for web).
Universal color depth support at import and export time. PhotoDemon can now write 1, 4, 8, 24, and 32bpp variations of every supported file format. Color depth detection is automatic at save time – the program will count the number of colors in an image and automatically save to the most appropriate color depth. Alternatively, you can set a preference to manually specify color depth at save time. This also works for grayscale images; for example, the JPEG encoder will now detect grayscale images and write out 8bpp JPEGs accordingly. Alpha thresholding is also available when saving 32bpp images to 8bpp (e.g. PNG to GIF).
New pngnq-s9 plugin for optimizing PNG files.Pngnq-s9 is an optimized and feature-rich variant of the original pngnq optimization library. Pngnq-s9 works by converting 32bpp PNG files to 8bpp with a heavily optimized palette, including support for variable alpha channels. File size savings of over 50% are common. See the Options -> Plugin Manager -> pngnq-s9 menu for a full list of tunable parameters.
New plugin manager and plugin downloader. Plugins can now be individually enabled/disabled, and missing plugins can be automatically downloaded. All plugin installation and activation/deactivation can be applied without a program restart.
Many canvas and interface improvements. Larger effect and tool previews. Persistent zoom-in/zoom-out buttons. Image URLs and files can now be directly pasted as new images. Improved drag/drop support, including drag/drop from common dialogs. New “Safe” save behavior to avoid overwriting original files. New Close All Images menu. New algorithms for auto-zoom when images are loaded, meaning much better results at all screen sizes. Tool and file panels can now be hidden. Higher-quality dynamic icons for the program, taskbar, child windows, and Recent Images list. Improved support for low screen resolutions.
Many performance improvements. More aggressive memory management means lower resource usage. Program loading has been heavily streamlined, and now happens in less than a second on modern hardware. Image loading is much faster and more robust, including better support for damaged or incomplete image files.
Much more robust and comprehensive error handling. When loading multiple images, the program will now suppress warnings and failures (such as invalid files) until all images have been loaded. Many subclassing issues have been resolved – so no more surprise crashes! Overall this release should be extremely stable.
Here is a list of known bugs with the current beta. These bugs will be fixed before the final release.
When a new language is selected, some text may not be translated. This is not a problem with the translation engine – it is a problem with the translation files, which are still being finalized. All text will be translated in the final release.
When using a language other than English, some text may overflow its boundaries or disappear off the page. This is a known problem that is still being worked on. All text – in any language – should fit properly in the final release.
PhotoDemon v5.2 is now available. New features include selection tools, arbitrary rotation, HSL adjustments, CMYK support, new user preferences, multiple monitor support, and more. Download the update here.
New Feature: Selection Tool
Selections have been one of the top-requested PhotoDemon features since it first released, so I’m glad to finally be able to offer them. A lot of work went into making selections as user-friendly and powerful as possible.
Three render modes are provided. On-canvas resizing and moving are fully supported, as are adjustments by textbox (see screenshot above). Everything in the Color and Filter menus will operate on a selection if available, as well as the Edit -> Copy command.
(Note: as of this v5.2, selections are not yet tied into Undo/Redo, and selections will not be recorded as part of a Macro. These features will be added in the next release.)
New Feature: Crop to Selection
New Feature: HSL Adjustments
New Feature: Arbitrary (Free) Rotation
New Feature: CMY/K Rechanneling
New Feature: Sepia (W3C formula)
New Feature: Preferences Dialog (rewritten from scratch)
New preferences include:
Render drop shadows between images and canvas (similar to Paint.NET)
Full or compact file paths for image windows and Recent File shortcuts
Improved font rendering on Vista, Windows 7, and Windows 8 (via Segoe UI)
Remember the main window’s location between sessions
Loading and Saving:
Tone map imported HDR and RAW images
Options for importing all frames or pages of multi-image files (animated GIFs, multipage TIFFs)
Automatically clear selections after “Crop to Selection” is used
Pick your own transparency checkerboard colors
Pick from three transparency checkerboard sizes (4×4, 8×8, 16×16)
Allow PhotoDemon to automatically remove empty alpha channels from imported images
All preferences from v5.0 remain present, and there is now an option to reset all preferences to their default state – so experiment away!
New Feature: Recent File Previews (Vista, Windows 7, Windows 8 only)
New Feature: Multi-Image File Support (animated GIFs, multipage TIFFs)
New Feature: Waaaay better transparency handling, including adding/removing alpha channels
It’s hard to overstate how much better transparency support is in v5.2 compared to v5.0. Images with alpha-channels are now rendered as alpha in all viewport, filter, and tool screens. When printing, saving as 24bpp, or copying to the clipboard, transparent images are automatically composited against a white background. As mentioned previously, user preferences have been added for transparency checkerboard color and sizes.
PhotoDemon also allows you to add or remove alpha channels entirely. Here’s an example of an image with an alpha channel, and the associated “Image Mode” setting:
And here it is again, after clicking the “Mode -> Photo (RGB | 24bpp | no transparency)” option:
Finally, PhotoDemon now validates all incoming alpha channels. If an image has a blank or irrelevant alpha channel, PhotoDemon will automatically remove it for you. This frees up RAM, improves performance, and leads to a much smaller file size upon saving. (Note: this feature can be disabled from the Edit -> Preferences menu if you want to maintain blank alpha channels for some reason.)
New Feature: Custom “Confirm Unsaved Image(s)” Prompt
Improved Feature: Edge Detection
New Feature: Thermograph Filter
This Wikipedia article describes thermography in great detail. PhotoDemon’s thermography filter works by correlating luminance with heat, and analyzing the image accordingly. Here’s a sample, using a picture of the lovely Alison Brie, of Mad Men and Community fame:
New Feature: JPEG 2000 (JP2/J2K), Industrial Light and Magic (EXR), High-Dynamic Range (HDR) and Digital Fax (G3) image support
PhotoDemon now supports importing the four image types mentioned above, and it also supports JPEG 2000 exporting.
Multiple monitor support during screen captures (File -> Import -> Screen Capture)
Many miscellaneous interface improvements, including generally larger command buttons, text boxes, labels, and more uniform form layouts.
Many new and improved menu icons.
Heavily optimized viewport rendering. PhotoDemon now uses a triple-buffer rendering pipeline to speed up actions like zooming, scrolling, and using on-canvas tools like the new Selection Tool. Even when working with 32bpp images, all actions render in real-time.
Bilinear interpolation is now used during Isometric Conversion. This results in a much higher-quality transform. Hard edges are still left along the image border to make mask generation easy for game designers.
Vastly improved image previewing when importing from VB binary files.
Better text validation throughout the software. Invalid values are now handled much more elegantly.
More accelerator hotkey support, including changes to match Windows standards (such as Ctrl+Y for Redo, instead of the previous Ctrl+Alt+Z).
Update checks are now performed every ten days (instead of every time the program is run).
All extra program data – including plugins, preferences, saved filters and macros – have been moved to a single /Data subfolder. If you run PhotoDemon on your desktop, this should make things much cleaner for you.
PhotoDemon’s current and max memory usage is now displayed in the Preferences -> Advanced panel.
tl;dr – I’ve spent 12 years working on an advanced image processing program. (Think PhotoShop, but without any on-canvas painting tools.) 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. You can download it here.
I can’t often say that a blog post has been 12 years in the making… but believe it or not, this post has taken me that long to write.
Many years ago, when I was but a lowly high school student, I legitimately believed that I alone could produce the world’s greatest video game. It was going to be epic in every possible way – immersive 3D graphics, fully orchestrated musical score, hundreds of pages of witty dialogue. I was going to program the whole thing myself in Visual Basic 6.0, and it was going to be AWESOME.
This might shock you, but that game never came to fruition.
Fortunately, my delusional teenage aspirations weren’t entirely a waste – I did end up writing many hours of original music for the game, and I also produced a suite of useful development tools. One of those tools was called the GenesisX Image Studio, after my one-man GenesisX Production Company. (Yes, that name sounded cool to my teenage mind.) The purpose of GenesisX Image Studio was to convert 24-bit image files to the game’s custom 8-bit Genesis X Format.
Perhaps you recall, but back in the year 2000 bandwidth was hard to come by, and distributing a game chock full of large 24-bit images over the Internet simply wasn’t feasible. GIF images were still under patent protection so there were concerns about using them, and PNG wasn’t widely known or supported. So I decided to write my own image format, and this was the program capable of converting JPEGs and BMPs to that:
While the GXF Compressor was hideous to look at, it included some interesting code, including a rather clever interactive palette editor. That palette editor was at the heart of the Genesis X Format. It worked by taking 256-color images and blending low-frequency colors at a ratio of their occurrences within the image. This way, it was possible to get a 256-color image down to 128 colors or less with very little degradation; the image would then be RLE compressed and optionally zLib compressed, and it was capable of producing downright tiny files.
When the ultimate game project associated with this software died, I continued to peck away at the image studio, mostly because I enjoyed learning about image processing and the software already provided a framework for things like loading and saving images, zooming and scrolling them, and a rudimentary set of filters. Over time, I eliminated the 256-color feature set and focused only on 16 million color support. Eventually the ridiculous “GenesisX” moniker was dropped, and the project was renamed “DemonSpectre Image Workshop.” (DemonSpectre was my online alias at the time.)
In 2002, Microsoft introduced the first version of Visual Studio .NET, effectively obsoleting the COM-based VB6 overnight. I was in university by then, and had become very aware that VB was not the right language for a programmer who wanted to be taken seriously in the U.S. job market. So I learned C++, java, and Perl, though I retained a love for classic VB, in large part because it was the language that got me into programming in the first place.
The next 8-9 years saw slow, incremental upgrades to the software, usually the result of a random night or weekend when I was fed up with work and needed to focus on something not-work-related. Eventually I renamed the software “VB Photoshop” (no copyright problems there!), then later PhotoDemon, a mash-up of my old DemonSpectre moniker and the fact that the software had grown to focus primarily on photo editing.
In fact, my interest in digital photography led to many of the program’s best features, since I used PhotoDemon to implement tools that other image editing programs lacked or implemented poorly. (I’m looking at you, PhotoShop batch conversion!) Since its inception, PhotoDemon also served as a testbed for my image processing work in other programming languages, because for all its flaws, classic VB is unbeatable as a rapid prototyping language. I still use it for first-implementation tests of obscure features or filters, simply because I can go from pseudocode to real-time implementation in minutes (versus hours in java, and days/months in C). And because VB6 compiles down to native code (unlike the interpreted P-code of earlier versions), it’s perfect for prototyping image processing code, which often needs to execute in real-time.
Because I continued to receive a surprising amount of traffic to my VB-oriented programming site, I would periodically strip interesting features out of PhotoDemon and publish them independently. In fact, most of my open-source programming projects are merely subsets of PhotoDemon’s codebase. (And it’s a surprisingly large codebase – over 30,000 lines – and that’s not including the 3rd-party DLLs it relies on for extra functionality.)
Every now and then, I’ll receive an email from a poor programmer who’s stuck supporting a legacy VB6 application and has consequently stumbled across my site. These emails always brighten my day, and they’re the reason I still provide VB6 projects despite the language being “dead” for more than 10 years. (Although “dead” is a relative term – Microsoft’s extended support lasted until 2008, and they have promised “it just works” compatibility for VB6 applications FOR THE LIFETIME of Windows 8. I know people have their criticisms of Microsoft, but no major tech company is half as good as they are when it comes to supporting legacy software. Hats off to Microsoft for that.)
Occasionally, these emails will ask me if I have a single project that condenses my many image processing techniques into a single piece of software. For ten years, my response to this question has been a vague, teasing, “maybe I do – you’ll have to wait and see!” I’m not sure why I’ve never just tell people about PhotoDemon… probably because they would pester me for copies of the code, and I hate sending out .zip files of large source directories, especially when I haven’t made up my mind about how I want to license said code.
But this summer, as I was sending out yet another one of these vague email responses, it struck me that I’d spent the past ten years hinting at PhotoDemon but never really thinking seriously about when it might live somewhere besides my hard drive. Wasn’t it time to seriously commit to getting the project in a workable state? (Anyone who knows me shouldn’t find this surprising – my motto has always been “better late than never,” and boy does this project meet that definition!)
So I committed, then and there, to getting PhotoDemon into a workable state. My last three months have been spent cleaning up its code base, stripping out useless functions and features, writing documentation, and coaxing it to work with modern Windows visual styles – no small feat, considering VB6 never worked with Windows XP visual styles, let alone Windows 7.
Because I’m a glutton for punishment, I also got PhotoDemon working with modern version control software. (Here it is on GitHub.) I wonder if I’m the first person to try and get a massive VB6 codebase working properly with Git… Surprisingly, it does work, though it takes some tweaking thanks to VB’s strange intermixing of text and binary files. Maybe someday I’ll document what I did. Then again, maybe not – I’m not sure I want people trying to set up legacy VB projects with GitHub, lol.
After getting the code to a pleasantly robust state, I put up a preliminary project page for PhotoDemon on this site. That was six weeks ago. Thus far it seems to have been well-received among the VB programmers who frequent my site, and with the help of those programmers, many miscellaneous bugs have been squashed. After a rigorous few weeks of testing, I think PhotoDemon is finally stable enough to warrant broader use.
And that’s why this blog post exists.
Over the next few weeks, possibly months, I plan on releasing a series of “developer diaries” that discuss PhotoDemon’s features and design in detail. I don’t know many projects with a 12-year development time that spans from the developer first learning to program to becoming a professional coder, and I think my experiences could be useful for other young programmers looking to embark on their own open source project. Also, some of PhotoDemon’s more advanced capabilities – such as macro recording and playback – represent unique design challenges, and I think it could be worthwhile to discuss the implementation hurdles I faced in hopes of helping other programmers build such features right on their first try.
But for now, here’s what’s worth mentioning: PhotoDemon is stable, and I’d love your feedback on it. It’s designed as a portable app, meaning no installer is required. Just download the .zip, extract it, and run PhotoDemon.exe. (Not a Windows user? PhotoDemon should work with the latest stable release of Wine.)
Input is welcome from programmers and non-programmers alike. To download just the executable, use this link:
A GitHub account is not required. Simply click the “ZIP” button with the cloud-and-arrow icon to download the source in standard VB6 format. (The ZIP button is just below the project description, in the top-left quadrant of the page.)
Stay tuned for posts describing PhotoDemon’s (quite large) feature set in detail, as well as in-depth guides for its advanced features, including macro recording and batch conversion.
Finally, note that PhotoDemon is updated regularly. I tend to make commits on at least a weekly basis, and often more frequently than that. For the most up-to-date version of the software, download it from GitHub.
Thanks for your interest, and I hope you enjoy the software.
Back in February 2009, I posted a brief summary of tannerhelland.com traffic for the last five months of 2008. I also mentioned a few goals related to traffic, including my hope that the number of unique visitors would double between 2008 and 2009.
I’m finally getting around to posting a follow-up, so for those interested – here’s how tannerhelland.com traffic has grown over the last 18 months.
Two interesting trends stand out to me:
First, I am excited about the steady growth of visitors. (Note that this chart shows human visits – bots aren’t included.)
Less exciting (to me) is an ongoing decrease in the site’s unique visitor / total visitor ratio. In the 1st and 2nd quarters of 2009, the number of visits per visitor hovered between 2.5 and 2.6, implying that most site visitors returned at least once or twice. In the 1st and 2nd quarters of 2010, this ratio has dropped to less than 1.4 – implying that the majority of visitors only visit once. While this isn’t inherently bad – especially considering that most of tannerhelland.com’s traffic is search-generated – it could certainly be better with some work on my part.
Another interesting metric is the site’s ratio of visits and pageviews:
As you can see, the average tannerhelland.com visitor looks at quite a few pages on a given visit. The pages/visitor ratio hasn’t changed significantly over time (it peaked at 5.2 in 4th Q ’09 and is currently 4.8), possibly because the site hosts a number of multi-part articles.
Next comes a chart for pageviews and hits. Hits represent any file pulled from the site – so a single page could easily represent multiple hits once all the images, stylesheets, and accompanying .js files are counted:
My hits/page ratio has grown over time (from 4.8 last winter to 6.6 this spring), thanks in part to the addition of more icons and images to most of my posts. I’d like to work this number back down as part of an increased emphasis on site optimization, which should benefit those of you browsing the site from mobile devices or (gasp!) still stuck on dial-up.
Finally, here’s how much bandwidth the site has served up over the last 18 months:
I try to keep the bandwidth down whenever possible (particularly when it comes to images), but some growth is an inevitable side-effect of more visitors and more content. I hope it doesn’t skyrocket too much when I make FLAC versions of my music available for download… ;)
Before ending this article, I wanted to share some fun site stats for the year ending 2009:
The busiest day of the week for visitors was Friday, but the busiest day for bandwidth (e.g. music and code downloads) was Sunday.
Visitors came from 167 different countries. The top five countries were United States, Great Britain, Canada, Russia, and France.
Average time per visit was 4 minutes 46 seconds.
In 2009, roughly 16 .zip files, 6 mp3s, and 3 midis were downloaded daily from the site. So far in 2010, those numbers have increased to 26 .zip files, 31 mp3s, and 4 midis a day. (People prefer mp3s to midis? Who knew! :p)
Many apologies for the momentary bout of RSS “spam” in tannerhelland.com feeds. I’ve been working on integrating my Twitter and WordPress accounts (which should eventually lead to more quality content both places). An unfortunate side-effect is that once everything got connected, a bunch of Twitter posts got sucked into WordPress, making it look like there were TONS of new posts. To make matters worse, WordPress has trouble assigning intelligent titles to tweets – especially if the tweet starts with a URL – so it makes the RSS look full of gibberish. I’m working on a system to remedy that.
I promise this won’t happen again, although as I fix some of the terrible auto-generated titles your reader may get confused and think these are yet more new posts. Sorry in advance! :)