On Saturday 09 October 2010, jr wrote:
> hi Andrew,
> 
> > TIA for any assistance/suggestions
> 
> don't have 'xloadimage' on my machine, however, if you have the
> ImageMagick(1) software installed, 'composite' will combine images.

Hi jr et al
using imagemagick has solved my background problem thanks, my bash function is 
now (roughly)
-------------------------------------------------------------------------->%
dologo() {
        BACK="images/virgin.jpg"
        LOGO="images/logo.gif"
        COPYRIGHT="images/copyright.gif"
# Get the root window size
        set `xwininfo -root | grep Width`
        shift
        width=$1
        set `xwininfo -root | grep Height`
        shift
        height=$1
        echo "screen is $width X $height"

# Get the correct zoom factor
        xzoom=`expr $width \* 100`
#  1280 is the X resolution of BACK
        xzoom=`expr $xzoom \/ 1280`
        yzoom=`expr $height \* 100`
#  1024 is the Y resolution of BACK
        yzoom=`expr $yzoom \/ 1024`

        convert ${BACK} -resize ${xzoom}x${yzoom}% composite.gif
# Set the positions of the COPYRIGHT and LOGO
        copyright_x=`expr $width - 350`
        copyright_y=`expr $height - 40`
        logo_x=`expr $width - 350`
        logo_y=`expr $height - 200`
        
        composite -geometry +${logo_x}+${logo_y} ${LOGO} composite.gif \ 
composite.gif
        composite -geometry +${copyright_x}+${copyright_y} ${COPYRIGHT} \ 
composite.gif composite.gif
# Blat the background
        xloadimage -fullscreen -onroot composite.gif
}

-------------------------------------------------------------------------->%
-- 
Andy Paterson

--
Next meeting:  Crown Hotel, Blandford Forum, Tuesday 2010-11-02 20:00
Meets, Mailing list, IRC, LinkedIn, ...  http://dorset.lug.org.uk/
How to Report Bugs Effectively:  http://goo.gl/4Xue

Reply via email to