Friday, October 5, 2012

Using GraphicsMagick to Set the Background

GraphicsMagick is a powerful graphics tool that can be used to set the background on Linux. I've been using xsetbg from the xloadimage package to set X-Windows background. However, I realized that GraphicsMagick can replace xloadimage and netpbm that I've used for setting background and converting images.



So far I just learned a few tricks for setting background with GraphicsMagick. To tile an image on the background, type a command like this:



gm display -window root background.jpg


To fill the background with an image smaller than the screen size, use the -geometry option:



gm display -window root -geometry 1440x960 Background.jpg


You can also use the percentage (%) sign to zoom in or out the image and place it on the background.



gm display -window root -geometry 300x200% background.jpg


You can add the -gamma option to darken or brighten the image. If gamma is less than 1, the output image will be darker. If gamma is greater than 1, the image will be brighter.



gm display -window root -gamma 0.5 BG_pix.jpg


There are many more options that you can use with GraphicsMagick, for example, -crop, -dither, -trim etc. Read the manual page of GraphicsMagick and documentation for further information.

No comments:

Post a Comment

About This Blog

KBlog logo This blog is about current events and issues concerning general population. Thanks for visiting the blog and posting your comments.

© Contents by KBlog

© Blogger template by Emporium Digital 2008

Followers

Total Pageviews

icon
Powered By Blogger