More fun with the My Photos screensaver

I have a small confession to make: I’ve been having a lot more fun than I anticipated with the img2txt MyPhotos screensaver I reluctantly cobbled together the other day.

So first things first: I’ll apologize for talking it down. I still won’t be putting any pictures of grandchildren on there though. 😐

What’s the attraction? Call it a side effect of living through the 8-bit generation. I always find a certain measure of satisfaction in images that are somehow blocky and chunky, and not quite smooth or true-to-form.

Case in point:

 

A shameless plug for Ubuntu I suppose, but a good illustration of what “works.” Strong contrast between the image and the outlying areas, straightforward color arrangement and no awkward static that pollutes the final product.

On the other hand:

 

Obvious failure. Way too busy. Too much background noise, too many strong differences in color that get mushed about by the img2txt process. And no distinction between the focus and the environment.

And interestingly, many gradients fail for the same reason. Colors are translated unevenly at times, so an earthy green gradient, for example, will split into yellow and brown and green. Yuck.

The Internet loves Daft Punk, so …

 

This works quite well, partly because there’s no interference from outside the central image, and because the colors are strong. Interestingly enough though, lightning and fireworks — which you might infer work well, after seeing this — don’t.

For much the same reason, this works too.

 

Open the pod bay doors, Hal.

For an image that can dominate the effects of text conversion, here is an example.

 

I’m not a car person, but I sought this one out deliberately in hopes of getting something with a strong effect and a textured background. So yes, this was around No. 10 or so, on the list of attempts.

One more, and I’ll call it a day.

 

This one falls somewhere in the middle. It’s easy to see Tux and the trampoline on the hill, but the fun of the image is in the detail. So I suppose it’s only a half success.

For what it’s worth, the myphotos.sh script has burgeoned into this, for me.

#!/bin/bash
reset
ROWS=$((`tput lines` - 1))
while true ; do
	for i in $HOME/.wallpaper/*.bmp ; do 
		img2txt -W `tput cols` -H ${ROWS} $i
#		img2txt -W 133 -H 49 $i
		sleep 10
		clear
	done
done	

As you can see I’ve experimented with tput as a way of reading the dimensions of the console, but I’m coming across an issue where running applications will interfere with those numbers.

As a result, if the screensaver spawns while one or two particular applications have the focus, the image gets “smeared” as the screen scrolls unnecessarily.

It’s hard to explain. But using reset outside the loop seems to avoid that, and tput will report the right numbers of columns and lines.

Usually. If it doesn’t work for you, I recommend commenting out those lines, then uncommenting and adjusting the hard-coded dimensions.

You might go ahead and do that anyway though. After all, the shortest and quickest solution is usually the right one. Somebody famous once said that, or something like it. … 😕

1 thought on “More fun with the My Photos screensaver

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s