JPEG Saver 5.3

Published

JPEG Saver 5.3 is a strange update, adding something I really didn't want to do. For several years various JPEG Saver functions haven't worked well, and it was all down to a change that Microsoft made to how screensavers work. This is going to take some explanation.

The problem

The whole reason JPEG Saver has been having trouble is a change Microsoft made in about Windows 8 that meant Windows now starts a screensaver on its own desktop. I suspect the reason behind this is security related, but it doesn't provide a lot of protection as far as I can tell. The screensaver still has access to all the user's files, but it can't directly interact with the main desktop display.

Whatever the reason for the change, it broke all the JPEG Saver features that did want to interact with the main desktop:

This left me in an odd situation - all these things work properly if you run JPEG Saver directly (by using its preview button, or double-clicking a config file, or using the “JPEG Saver slideshow” Explorer menu) but fail to work when run by Windows as the screen saver. I was left with a few options:

  1. Do nothing;
  2. Remove the functions that don't work;
  3. Fix them.

Doing nothing has been my choice until now. It's quite easy, and I'm quite good at doing nothing. Unfortunately, it means people kept trying to use the things that don't work, then they tell me that they don't work and I have to try to explain why they don't work. Nobody is left very happy by this.

Removing the functions that don't work would be easy too, but since they do work some of the time that seems a bit drastic. In fact, setting the desktop background and selecting the current file are probably more useful when run from the “JPEG Saver slideshow” menu option so removing them would be a step backwards. So I was left with option 3.

The fix is in

The fix I have implemented for this problem is to leave something running on the main desktop that JPEG Saver can pass details to and from when necessary. In fact, it is just a copy of JPEG Saver that runs all the time waiting for another JPEG Saver to ask it for help. When started with the /b (for background) option JPEG Saver will create a tray icon and sit there as the “JPEG Saver desktop helper”, looking useless. Double-clicking it will open the config dialog, and right-clicking will show a small menu, but that is about it.

How does it work?

When JPEG Saver (running as the screensaver) needs to do something that requires desktop access it contacts the desktop helper and asks that to do it instead. For selecting a file in Explorer the filename is passed across and the helper process opens Explorer.

For updating the desktop background, the screensaver saves out the new file and messages the helper, which tells the desktop to refresh its background. To make this a bit more consistent JPEG Saver now alternates between using two desktop background files so that Windows will actually load the new file.

“Now Playing” item support is done by the screensaver asking the helper what is playing, and the helper responding with the track, artist and media player name if it can find any running. Since this actually makes the Now Playing item useful again I've improved the media player support, but more about that later.

Finally, the desktop background modes - I haven't attempted to fix these at all. This is one area where I think there is a decent reason for running the screensaver on its own desktop. If you are in an open plan office and your screensaver starts up, you might not want people to still be able to see what is on your screen. On the other hand, why would you choose an option that makes your desktop appear on the screensaver in that case?

Do I really need to run the desktop helper?

No. JPEG Saver (run as the screensaver) will work without it, falling back to the behaviour from previous versions where it will attempt to do everything itself (and probably fail miserably). It's your choice whether to use it or not.

What are the security implications?

I can't think of any to be honest. The reason I took this long to add the desktop helper is that I thought I would have to add some kind of server that would be a huge security hole, but it turned out that it was a lot easier than that. For anyone technically minded, the implementation uses events and shared memory, and the only data passed between the processes are filenames and media track details.

What is this HelperLauncher.exe file for?

This is a small program (under 100 lines of code) that launches JPEG Saver as the desktop helper. Without it, you would have to start the JPEG Saver desktop helper from the command line, passing in the /b switch yourself. This is because Windows treats screensavers differently to other programs, making it impossible to add a shortcut with command-line options.

Media player support

Now that the “Now Playing” item might actually be useful again, I thought it would be a good idea to support more media players. So now JPEG Saver supports reading track details from these players:

The Groove Music and Windows Media Player handlers are a bit experimental, so your mileage may vary with these. I've had to resort to using the Windows Automation API (which is usually used by screen readers and testing software) to get any details from them, and the availability of the track details depends on which mode the media player is in.

The other media players should work fine though, so if you have any trouble with them please let me know. If you want me to add support for any other players, contact me about that as well. The old iTunes support from before is still compiled in, but it doesn't appear to be working for me - let me know if you really want that working and I'll look into it (or you could use one of the media players I listed above instead - some of them are really good).

The updated installers are available from the downloads page.

« Previous: SVGGraph 3.0.1 Next: SVGGraph 3.1 »

This site uses cookies - details here.