# Desktop Slush – A cool desktop enhancement

2005-04-18

Ever find yourself glancing at your desktop looking for a shortcut for more than a few seconds ?

People will sometimes choose [beautiful pictures](http://images.google.com/images?q=nature+wallpaper) that aren't fit to be a wallpaper. The heart of the problem tends to be the lack of contrast between your icon/s and the wallpaper it's sitting on. That's why an Icon can lurk in some dark/bright corner of the screen and almost get swallowed by the beautiful wallpaper you chose to put there.

![slush diagram](https://www.ohad.com/assets/blog/slush-diagram.jpg)

For once I had enough with that :-)  I decided to write a small program that will find your icons and make sure they don't blend in with your desktop, all this in an elegant way ofcourse as I'm a design/elegance freak.

I know I could have taken the icon-positions from the desktops Image-List, but that's just too easy :-)  I wanted to try out some image-processing, so here's what I did :

- Take a clear screen-shot of the desktop.
- Calc the [|difference|](http://www.ee.siue.edu/~cvip/CVIPtools_demos/ANALYSIS/ana_sub.html) between this and the user's wallpaper. (so logically the icons should stand out).
- Remove all the noise, as in take only the big differences.
- Run a [Maximum-Filter](http://www.carla146.it/tutor/tutortesti/14maxminmedUK.htm), this will expand that area consumed by the icons.
- Divide into a grid, then try to [Flood-Fill](http://en.wikipedia.org/wiki/Flood_fill) each point in the grid to find the areas from the previous step, then bound these areas with nice rectangles.
- Give these rectangles [round-corners](http://www.absolutecross.com/tutorials/photoshop/interfaces/round-edges/), a border, and make them semi-transparent.
- Blend back with the Original Wallpaper, and there we go.

Use the navigation buttons at the lower-left corner of the slideshow

I used the [Corona](http://sourceforge.net/projects/corona/) Library for loading/saving images.

And I decided to start using the [GPL](http://www.gnu.org/copyleft/gpl.html) for source-code I release, so here we go.

**Note: The program currently works with '_Stretched Wallpapers_' only, changes will be pleasantly accepted.**

Download: [Source](https://www.ohad.com/assets/files/ohd-desktop-slush-src.zip), [Binary](https://www.ohad.com/assets/files/ohd-desktop-slush-bin.zip).
