2016-03-19

Just a handful lines of code…

Allow me to introduce you to… Image Snatcher…

Screenshot of Image Snatcher

On Windows 10 you can configure the lock screen to show beautiful pictures provided by Microsoft.

Configuring Windows 10 lock screen

Those photos are in fact so pretty, that sometimes I want to use them as my desktop wallpaper. Currently this is not possible out of the box. So I searched the net where the pictures might be stored. It appears to be AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets.

Well. I wrote a small JavaFX app that displays the contents of this directory. If you move the mouse pointer over a preview image and click on Save, you get a file save dialog. Enter a filename and the picture is saved as a .png file. Also, you can show the image in the default image viewer.

The beauty of this app isn’t its visuals, but its line count. Roughly 230 lines of actual code. Getting a small app ready fast is possible with JavaFX, too. Sadly enough, beauty fades when it comes to actually distributing it. Yes, I could run the JavaFX packager, just to get tons of megabytes. I keep getting nostaligc, but letting go Project Vector was one of the worst ideas Oracle ever had.

Edited 2016/07/02: I removed the class from my BitBucket snippets and put a little more capable version on GitHub. Currently we have about 230 lines of code, but you can not only save the image, but show it in the default image viewer

No comments:

Post a Comment