| View previous topic :: View next topic |
| Author |
Message |
JackDog Apprentice


Joined: 08 Sep 2004 Posts: 297 Location: St. Louis, Missoura
|
Posted: Tue May 24, 2005 1:46 pm Post subject: Background images for dual monitors...? |
|
|
Does anyone know of a good resource for images that fit dual screen monitors?
Currently in Gnome in KDE, its only possible to specify a single image as your background, spanning both monitors. It would nice if you could specify an image for each screen. Anyone know of any good solutions? Is there an easy way to paste two images together maybe? _________________ Are you intolerant of intolerant people? Tired of being PC yet? |
|
| Back to top |
|
 |
tgurr Developer

Joined: 27 Jan 2004 Posts: 568 Location: germany
|
Posted: Tue May 24, 2005 1:53 pm Post subject: |
|
|
| www.deviantart.com has a dual screen wallpaper section. |
|
| Back to top |
|
 |
troycurtisjr n00b


Joined: 07 Jun 2005 Posts: 9
|
Posted: Tue Jun 07, 2005 10:50 pm Post subject: What I use |
|
|
Unfortunately there isn't a way to specify a diffenent pic in each window, unless you use two seperate X sessions in each monitor. Apparently you can specify individual pics in OSX and with the NVIDIA nview software on Windows (but not natively in Windows). I have found the best solution is to just stick images together, and because I want it done fast and easily repeated for a whole slew of images, I needed a command line function.
I found the image magick package (emerge imagemagick) to have everything that I ever wanted and more.
For the simplest case, you have two images that are the same size (and hopefully the same aspect ratio of your resolution). You just want one stuck to the left (or right) of the other. Simply issue this command:
| Code: | | convert image1.jpg image2.png +append output_name.jpg |
Note that you can just mix and match the file types, image magick (IM) does the rest...and it even knows to convert your final image to a jpeg (if you give it a *.jpg extension). If you have different size pictures, the above command will simply stick them together, mismatched sizes and all, leaving you with a stairstep looking image. So you need to first resize one to match the size of the other. It doesn't matter if you shrink the big one, or enlarge the smaller one. If you chose to enlarge the small one remember that it could start to pixelate. To resize an image just type:
| Code: | | convert input.jpg -resize widthxheight output.jpg |
By default, IM will keep the same aspect ratio, so think of the "widthxheight" dimension as a bounding box. for instance, If you have a 1600x1200 jpg and want to resize it to match your 1280x1024 monitor resolution you might type:
| Code: | | convert gentoo1600x1200.jpg -resize 1280x1024 output.jpg |
The output image will actually be 1280x960 (1600/1200 == 1280/960 != 1280/1024). If you really want to skew the image in whatever way is necessary use the escaped ! :
| Code: | | covert gentoo1600x1200.jpg -resize 1280x1024\! output.jpg |
And that will give you the requested 1280x1024, albeit warped.
Sorry it was so long-winded. Well that should do it, know you just have to find some neat gentoo wallpapers! (try emerge gentoo-artwork) |
|
| Back to top |
|
 |
ZZamboni Tux's lil' helper


Joined: 16 Jan 2004 Posts: 96 Location: Zurich, Switzerland
|
Posted: Wed Jun 08, 2005 6:54 am Post subject: |
|
|
I wrote the following script, which grabs two random images from my backgrounds directory and stitches them together, in the appropriate sizes, to fit my two monitors. It uses the ImageMagick utilities, pointed out by troycurtisjr already.
| Code: | #!/bin/bash
# Build a background for a xinerama double screen from two images.
# The images are scaled to the appropriate size and then glued together.
# Usage:
# buildxineramabg out.jpg
# choose two random images from IMGDIR, output to out.jpg
# buildxineramabg out.jpg img1.jpg
# use the same image, output to out.jpg
# buildxineramabg out.jpt img1.jpg img2.jpg
# use the two specified images, output to out.jpg
# If the images given are not found, they are looked for inside IMGDIR
#
IMGDIR=$HOME/lib/images/backgrounds
# For some reason 2 pixels are lost in the process, so the vertical size
# has to be two pixels larger than the screen resolution
SIZE1=1400x1052
SIZE2=1600x1202
# Needs ImageMagick
CONVERT=mogrify
MONTAGE=montage
OUT="$1"
shift
getrandomimg()
{
ls $IMGDIR | perl -e '@f=<>; print $f[int(rand($#f+1))]'
}
if [ $# -eq 0 ]; then
IMG1=`getrandomimg`
IMG2=`getrandomimg`
# Avoid both sides being the same image
while [ "$IMG2" == "$IMG1" ]; do
IMG2=`getrandomimg`
done
elif [ $# -eq 1 ]; then
IMG1="$1"
IMG2="$IMG1"
else
IMG1="$1"
IMG2="$2"
fi
if [ ! -f "$IMG1" ]; then
if [ -f "$IMGDIR/$IMG1" ]; then
IMG1="$IMGDIR/$IMG1"
else
echo "Error: $IMG1 not found" >&2
exit 1;
fi
fi
if [ ! -f "$IMG2" ]; then
if [ -f "$IMGDIR/$IMG2" ]; then
IMG2="$IMGDIR/$IMG2"
else
echo "Error: $IMG2 not found" >&2
exit 1;
fi
fi
# First resize the images to the appropriate size
TMPDIR="/tmp/xineramabg.$$"
rm -rf $TMPDIR; mkdir $TMPDIR
TMP1="$TMPDIR/`basename \"$IMG1\"`"
TMP2="$TMPDIR/`basename \"$IMG2\"`"
cp "$IMG1" "$TMP1"; $CONVERT -resize "$SIZE1!" -fill yellow -gravity SouthEast -draw 'text 3,18 "%t"' -format jpg "$TMP1" 2>/dev/null
cp "$IMG2" "$TMP2"; $CONVERT -resize "$SIZE2!" -fill yellow -gravity SouthEast -draw 'text 3,18 "%t"' -format jpg "$TMP2" 2>/dev/null
# Now put them together
$MONTAGE +frame +shadow +label -background black -geometry +0+0 "$TMP1" "$TMP2" "$OUT"
rm -rf $TMPDIR
|
|
|
| Back to top |
|
 |
troycurtisjr n00b


Joined: 07 Jun 2005 Posts: 9
|
Posted: Wed Jun 08, 2005 10:15 am Post subject: |
|
|
| Ah, very neat idea ZZamboni! I just may have to use that myself...of course that means that I need to UNstitch all the ones that I have already stuck together (I didn't keep the orginals). Very neat idea indeed. |
|
| Back to top |
|
 |
FishB8 l33t


Joined: 17 Mar 2003 Posts: 780
|
Posted: Wed Jun 08, 2005 5:07 pm Post subject: |
|
|
Just make a black background to fit both screens with a sign that will show up on one monitor pointing to the other monitor that reads "I'm with stupid".  _________________ "...as we enjoy great advantages from the inventions of others, we should be glad of an opportunity to serve others by any invention of ours, and this we should do freely and generously." -Benjamin Franklin |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|