Description of problem: display -sample 1024x768+0+0 -window root img.png echo $? Happens IMO on setting solid colors too. Version-Release number of selected component (if applicable): ImageMagick-6.4.0.10-2.fc10.i386 How reproducible: always Actual results: 1 Expected results: 0
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
ImageMagick-6.5.1.2-1.fc11.x86_64 still the same. That wrong exit code is quite annoying for app depending on it.
I'm sorry but given my other Fedora / RH tasks I do not have the time necessary to keep ImageMagick in good shape. So I'm re-assigning this to Pavel Alexeev who has been so kind to take over ImageMagick maintainance from me.
$ display -sample 1024x768+0+0 -window '0x04e01f7a' img.png ; echo $? 0 Seams work to me. Did you provide correct windowid? Did IM change backgroupd of it? $ rpm -q ImageMagick ImageMagick-6.5.1.2-1.fc11.i586 Please reopen if problem persists.
newman@dhcp-lab-124 dejagnu-1.4.4 $ display -sample 1024x768+0+0 -window root /etc/favicon.png newman@dhcp-lab-124 dejagnu-1.4.4 $ echo $? 1 ImageMagick-6.5.1.2-1.fc11.x86_64 Perhaps it's happening with root window only?
What is "root" window id?? May be you a mistaken and try use window name or title as id? In this case behavior is correct - window with this id not found, 1 returned as status. Window id must be hexadecimal number like in my example before.
'root' is your desktop. It worked for me, set the img to root window (= set imt to desktop). Here's one of the references I found on the net wrt '-window root': http://www.imagemagick.org/pipermail/magick-users/2003-October/010929.html
May be it is undocumented future (bug)? Try something similar: display -sample 1024x768+0+0 -window `wmctrl -l | head -n1 | cut -d' ' -f1` /etc/favicon.png
newman@dhcp-lab-124 dejagnu-1.4.4 $ display -sample 1024x768+0+0 -window `wmctrl -l | head -n1 | cut -d' ' -f1` /etc/favicon.png newman@dhcp-lab-124 dejagnu-1.4.4 $ echo $? 0 What happens if I use 'GuGu' as a ID: newman@dhcp-lab-124 dejagnu-1.4.4 $ display -sample 1024x768+0+0 -window GuGu /etc/favicon.png display: no window with specified ID exists `GuGu': Resource temporarily unavailable @ display.c/XDisplayBackgroundImage/13603. newman@dhcp-lab-124 dejagnu-1.4.4 $ echo $? 1 Expected. When I use 'root' as ID it writes out *no* error msg like happens with 'GuGu', so, I guess it some sort of known alias to root window.
> When I use 'root' as ID it writes out *no* error msg like happens with 'GuGu', > so, I guess it some sort of known alias to root window. I doubt. Can you contact upstream developers to clarify this?
So, I think now what behavior correct, especially according manpage. I close it. Please reopen, if you get other details.