Page 1 of 1
displaying wallpaper (display -backdrop ...) problem
Posted: 2010-07-29T01:33:14-07:00
by archguest
I am trying to use
display from ImageMagick 6.6.2-10 on Arch linux to show
this image from Arch linux in the centre of my desktop. I run it with:
Code: Select all
display -backdrop -background '#3f3f3f' -flatten -window root Downloads/archlinux-logo-light-90dpi.png
I get the image displayed in the centre of my root window (desktop) but my -background option is ignored for both within and outside of the image. Within the image I get white in place of transparency 'checkboard' and outside I get black.
I read
the documentation for display and I can't figure out what is wrong.
What I would like to achieve is to display this image in the centre of my root window, on the background colour #3f3f3f with transparent parts of the image being transparent that is being #3f3f3f. Please help.
Re: displaying wallpaper (display -backdrop ...) problem
Posted: 2010-07-29T09:51:57-07:00
by fmw42
This works with color names, but does not work with hex or rgb colors on my Mac OSX Tiger IM 6.6.3.1 Q16
display -background gray -backdrop <image>
You could report this to Developers or Bugs and ask about non-color name representations of colors in display.
Re: displaying wallpaper (display -backdrop ...) problem
Posted: 2010-07-29T10:47:11-07:00
by archguest
fmw42 wrote:...
Thanks for the hint! Actually, the colour representation worked this time because I tried
a different order of arguments! How weird is that?
This arrangement of arguments
ignores -background option and gives white background for transparent parts:
Code: Select all
display -backdrop -background '#3f3f3f' -flatten -window root Downloads/archlinux-logo-light-90dpi.png
This gives the correct background #3f3f3f for transparent parts:
Code: Select all
display -flatten -backdrop -window root -background '#3f3f3f' Downloads/archlinux-logo-light-90dpi.png
Imagemagick command line options page does not mention that order of arguments is important and neither does
the manual for display.
Do you think it is a bug?
Re: displaying wallpaper (display -backdrop ...) problem
Posted: 2010-07-29T11:15:14-07:00
by fmw42
Is flatten really necessary?
This works just fine for me:
display -background gray -backdrop logo2t.png
as does this
display -background '#3f3f3f' -backdrop logo2t.png
If you really want to use -flatten, then this is where it should be:
display -background '#3f3f3f' -flatten -backdrop logo2t.png
But it is no different from leaving it off.
I am on mac osx tiger, IM 6.6.3.1 Q16
Order is important as you have to tell -backdrop what color you want prior to invoking -backdrop. IM is like that with respect to settings before options. see
http://www.imagemagick.org/Usage/basics/#why