insert single image without tiling (using display window id command)

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Posts: 1
Joined: 2019-08-25T08:35:25-07:00
Authentication code: 1152

insert single image without tiling (using display window id command)

Post by jlfh0816 »

I have an issue. When using the display -window id (or animate -window id) command, the image (or the animated gif) is used to tile the background of the target window.
How do I prevent this tiling and display one instance of the image only?
The image is very small (24x24 px) and I want to display it in the upper left corner (x=0 y=0).
The image Image
and the result in the target window

using the above small script:

Code: Select all

while true
	titre=$(xdotool getactivewindow getwindowname)
	if [[ $titre == 'Musique' ]]; then
sleep 2
# get the window_id for the current active window
	win_id=$(xdotool getwindowfocus)
		display -window $win_id image.png
Thank you!

PS: I use ImageMagick version 6.9.7-4 Q16 x86_64 20170114 and Xubuntu 18.04.3 (64 bits) and the Nemo file manager
Post Reply