JPEG Saver 4.11.2
Published
Here's another minor update to JPEG Saver, fixing a couple of bugs that were reported to me and some other things that I noticed while testing and using it myself.
The most glaring bug fixed in this version is one that would rotate images incorrectly, due to my misunderstanding some of the EXIF specification. The details of how the image should be rotated to appear the right way up on the screen are stored as a field in the image's EXIF data. If JPEG Saver came across an image without an orientation field in the main block of EXIF data, it would look in the next EXIF block for the field (if there was a second block). The second block is for details about the thumbnail image that is sometimes embedded in the main image, and JPEG Saver was taking the orientation from here and rotating the main image the way that the thumbnail image should be rotated instead of leaving it unrotated. Don't ask me why the thumbnail should have a different orientation from the main image, but it can happen and now JPEG Saver should be able to cope with it.
The first bug has been around for a long time, but the second was fairly new. When JPEG Saver happened to choose the same image to display twice in a row, it was not restarting the timer to load the next image. This was because the image loading code found that the image to be loaded was already in memory so didn't bother to load it again, and also didn't bother telling the main thread that the image was loaded. This meant that the main thread sat waiting for a message that never arrived and the images stopped changing.
The fix for that bug was to send the “image loaded” message to the thread anyway, but I've also made JPEG Saver much less likely to pick the same image twice in a row. If you only have one image that can be displayed, then obviously JPEG Saver will have to display it each time, but otherwise the current image will be avoided when picking the next image. This applies to all the random and shuffled modes, which means that they are actually slightly less random than before. A part of me doesn't like this (imagine tossing a coin and knowing that it will come up “heads” because it was “tails” last time) but it does look better.
Another quite annoying bug was that the configuration dialog could
disappear behind other windows on the screen after the “Preview”
button was pressed. It took me quite a while to figure out that it was because
I had given the main dialog window the WS_EX_TOOLWINDOW
extended
style, which makes the title bar of the window thinner on older Windows
versions. It also means that it doesn't act quite like a top-level window, so
after the preview had completed Windows was giving focus to the nearest main
window it could find and shoving JPEG Saver's dialog to the back.
One more bug in the dialog that could be quite confusing was that the focus remained in the last control selected after switching to another tab. The meant that you could end up modifying the change delay from the “Folders” tab by using the mouse wheel, and other similarly unwanted effects. The focus is now set to the most likely control in the current tab when you switch between them.
Some smaller config dialog annoyances fixed in this version: the pointer changing to the “busy” cursor the first time it enters the dialog; both the “OK” button and the “Preview” button being set as the default button for the dialog; double-clicking a token in the list to insert it into the format editor now returns focus to the editor; background, style and border colours are shown in the “Custom colours” section of the colour picker dialog. (I've just noticed that it is spelled “Color” on my computer, even though I've set the locale to United Kingdom English. Weird.)
There are some small additions that I've made in this version, to the tokens available in the “List info” item. You can now display the number of folders, the folder position in the list, the number of files in the current folder and the position of the current file in the folder. If I haven't put that very clearly, try “Folder %P of %C” and “Image %i of %j” in the item format.
One more set of changes that will probably have no effect on most systems is that I have made JPEG Saver close itself down when Windows' power management turns the monitor off or if the PC goes into standby. Windows would normally kill the screen saver at these times anyway, but now JPEG Saver will shut itself down cleanly.
The new version of JPEG Saver is available from the downloads page.