-backdrop does not center any more

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
druckmusik

-backdrop does not center any more

Post by druckmusik »

Hello,
in release 6.4.9-1, 6.4.9-2 and 6.4.9-3 (maybe in some earlier releases too),
the following command does not center the image anymore:

display -backdrop -window root image.jpg

What I want is the image diplayed centered on the background.
It definitly works with release 6.4.7-10


Regards
Stefan
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: -backdrop does not center any more

Post by magick »

What happens if you add -gravity center to your command line?
druckmusik

Re: -backdrop does not center any more

Post by druckmusik »

magick wrote:What happens if you add -gravity center to your command line?
It doesn't know the "-gravity" option:
display -backdrop -window root -gravity center image.jpg
display: unrecognized option `-gravity' @ display.c/DisplayImageCommand/1151.
procdaemon

Re: -backdrop does not center any more

Post by procdaemon »

I'm also having this problem. I've tried versions 6.4.9-7, 6.5.0-0, and 6.5.0-1.

Backdropped images are oriented to the top left corner of the root window contrary to the information in the documentation.

This is a screenshot of my dekstop after running: display -window root -backdrop image.jpg
Image
All three said versions give same results.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: -backdrop does not center any more

Post by magick »

We'll add support for the -gravity option for the display program in the next ImageMagick point release.
procdaemon

Re: -backdrop does not center any more

Post by procdaemon »

magick wrote:We'll add support for the -gravity option for the display program in the next ImageMagick point release.
Thanks. Until then I've been using a simple wrapper script.

Code: Select all

#!/bin/sh
[ -e $1 ] || exit

TEMP=${HOME}/bin/.bgsetter$$.temp.png
REZ="1680x1050"
PIC=$1

convert ${PIC} -resize "${REZ}>" -size ${REZ} xc:black +swap -gravity center -composite ${TEMP}
display -window root -backdrop ${TEMP}
rm ${TEMP}
druckmusik

Re: -backdrop does not center any more

Post by druckmusik »

magick wrote:We'll add support for the -gravity option for the display program in the next ImageMagick point release.
Hm, with ImageMagick-6.5.0-5 the -gravity option is implemented, but doesn't do anything :-(


Stefan
Post Reply