Bug 492477 - `display -sample 1024x768+0+0 -window root img.png' exits with "1" even on success
Summary: `display -sample 1024x768+0+0 -window root img.png' exits with "1" even on su...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: ImageMagick
Version: 10
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Pavel Alexeev
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-03-26 21:56 UTC by Michal Nowak
Modified: 2013-03-08 02:05 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-08-12 08:56:55 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michal Nowak 2009-03-26 21:56:58 UTC
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

Comment 1 Fedora Admin XMLRPC Client 2009-04-13 17:38:59 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 2 Michal Nowak 2009-07-01 10:33:26 UTC
ImageMagick-6.5.1.2-1.fc11.x86_64 still the same. That wrong exit code is quite annoying for app depending on it.

Comment 3 Hans de Goede 2009-08-10 08:47:53 UTC
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.

Comment 4 Pavel Alexeev 2009-08-10 11:07:09 UTC
$ 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.

Comment 5 Michal Nowak 2009-08-10 11:51:32 UTC
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?

Comment 6 Pavel Alexeev 2009-08-10 13:33:41 UTC
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.

Comment 7 Michal Nowak 2009-08-10 13:56:20 UTC
'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

Comment 8 Pavel Alexeev 2009-08-10 14:28:28 UTC
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

Comment 9 Michal Nowak 2009-08-10 14:45:22 UTC
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.

Comment 10 Pavel Alexeev 2009-08-10 15:21:18 UTC
> 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?

Comment 11 Pavel Alexeev 2009-08-12 08:56:55 UTC
So, I think now what behavior correct, especially according manpage. I close it.
Please reopen, if you get other details.


Note You need to log in before you can comment on or make changes to this bug.