Feature Request:Scale plus tile

Asked by Russell Almond

I like to have my images tiled, but that doesn't really work for all of my images. Some of the images are too big to fit on the monitor, and the image is clipped in one or both directions.

 What I would like in that case, is for the image to be scaled so that the height or width of the image matches the monitor and the other dimension is smaller (whichever dimesion which results in the entire image fitting on screen would be nice). The image would be then tiled in the remaining direction.

This is complicated by the fact that I have two monitors with different sizes, so I would like the image to fit on the smaller monitor.

Question information

Language:
English Edit question
Status:
Solved
For:
Wallch Edit question
Assignee:
No assignee Edit question
Solved by:
Russell Almond
Solved:
Last query:
Last reply:
Revision history for this message
Alex Solanos (hakermania) said :
#1

Hello Russell and thanks for your question.

The thing here is that Wallch doesn't really provide you with those "image style" options, but the GNOME desktop does. So, as long as the GNOME desktop does not allow some combination of this kind, then Wallch cannot do something like that.

To keep the spirits up though, we've thought about a "Run command" feature, that will allow you to run a custom command when the picture changes. So, you will be able to change the current "image style" to your liking by running a custom command that checks the image size.

But, you'll have to wait for something like that.

Revision history for this message
Alex Solanos (hakermania) said :
#2

Oh, and thanks for your kind donation :)

Revision history for this message
Russell Almond (almond-m) said :
#3

My thought was that if the image was too large it could be simply be rescaled before displaying it in tiled mode. I think that would still work when passing it to gnome. I haven't looked up the API call, so I'm not sure if you are passing the image or the filename. If the former it is pretty simple. If the latter, you would need to kludge something using a temp file (this might screw up the history).

You are welcome. (I've spent as much on shareware that does something similar for Windows and MacOS, so you deserve some some money for your efforts, too.)

Revision history for this message
Alex Solanos (hakermania) said :
#4

The call is done using the filename, not the image data.

What we will be preparing for the next version of the program, though, the command execution, could solve the problem pretty easily.

A command would run prior to setting the image as background, and it would check the image dimensions. If it needs rescaling, then it renames the original to $filename-original, scales it to $filename and then the script exits. Wallch then takes care of the new image ($filename) and sets it as background.

I think that having such a feature by default would be a bit confusing, but I believe that having a feature that runs a command before/after an image is set as desktop background it would be nice. This gives the idea of making an online directory of useful scripts to use Wallch with, as well.

Revision history for this message
Russell Almond (almond-m) said :
#5

Turns out what I want can be done in a one liner if you have Imagemagick installed. The command I used was

convert infile -resize '1366x768>' outfile

where 1366x768 is the size of my screen. This command only resizes the picture if it is too big to fit on the screen.

I actually ran this command recursively over all of the pictures in my collection, so I don't really need it installed in Wallch. But there may be an interesting future somewhere in adding effects by allowing a preprocessing command to be run over the images.