naelstrof / maim

maim (make image) takes screenshots of your desktop. It has options to take only a region, and relies on slop to query for regions. maim is supposed to be an improved scrot.
Other
2.15k stars 78 forks source link

An example command does not work #230

Closed dakyskye closed 3 years ago

dakyskye commented 3 years ago

One of the commands from examples do not work. To be precise, I am talking about maim -st 9999999 | convert - \( +clone -background black -shadow 80x3+5+5 \) +swap -background none -layers merge +repage shadow.png

$ maim -st 9999999 | convert - \( +clone -background black -shadow 80x3+5+5 \) +swap -background none -layers merge +repage shadow.png
convert: invalid image index `/tmp/magick-NO1x7WKHVn_TJH7R6UhQO_wW5UVRhpL1' @ error/list.c/CloneImages/282.
convert: no such image `+clone' @ error/convert.c/ConvertImageCommand/1027.
foxpy commented 3 years ago

works on my machine ™

foxpy commented 3 years ago

It may depend on your shell, distribution and many other things. What is your shell and distribution?

dakyskye commented 3 years ago

@foxpy Gentoo, bash 5.0.18.

dakyskye commented 3 years ago
$ slop --version
v7.5

$ maim --version
v5.6.3

$ convert --version
Version: ImageMagick 7.0.11-7 Q16 x86_64 2021-04-12 https://imagemagick.org
Copyright: (C) 1999-2021 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP(4.5) 
Delegates (built-in): bzlib cairo freetype jng jpeg lcms ltdl pangocairo png rsvg tiff x xml zlib
foxpy commented 3 years ago

My imagemagick package reports more delegates:

Delegates (built-in): bzlib cairo djvu fontconfig freetype heic jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png raqm raw rsvg tiff webp wmf x xml zip zlib

Considering your distribution being gentoo, you may have probably built imagemagick without some features used in previously mentioned one-liner.

dakyskye commented 3 years ago

All right, it makes sense. Those purple ones are not included in my ImageMagick build. image

dakyskye commented 3 years ago

Which one do you think I need for that?

foxpy commented 3 years ago

Which one do you think I need for that?

For a good start, I would just try including every feature possible to check if it fixes the problem. If problem remains unfixed, it is somewhere else...

dakyskye commented 3 years ago

All right, I will try and report the result here.

foxpy commented 3 years ago

To be honest I don't see any relation between these features and your error message, but we should probably try building imagemagick with all the features anyway.

dakyskye commented 3 years ago

Built with Every USE flag except two. Still the same result. (this is Fish shell, tried in Bash as well, same res) image

foxpy commented 3 years ago

Try downloading this image and running convert - \( +clone -background black -shadow 80x3+5+5 \) +swap -background none -layers merge +repage shadow.png < test.png

dakyskye commented 3 years ago

@foxpy image

dakyskye commented 3 years ago

So it's an issue with ImageMagick itself, but I've built it with all USE flags.. hmm, weird.

foxpy commented 3 years ago

So it's an issue with ImageMagick itself, but I've built it with all USE flags.. hmm, weird.

Yep! Considering you are on gentoo I can assume you have been using Arch in past and you may be familiar with Arch build system.

This is how they build imagemagick: https://github.com/archlinux/svntogit-packages/blob/packages/imagemagick/trunk/PKGBUILD

Maybe gentoo's USE flags don't cover some of the features enabled here? I have no idea.

dakyskye commented 3 years ago

Yeah I've been using Arch in the past. I'll have a look at this in a couple of hours when I get home. Thanks for your kind support.

foxpy commented 3 years ago

@dakyskye is this issue still relevant?

dakyskye commented 3 years ago

@foxpy this issue should be closed as the reported thing isn't related to maim itself, but ImageMagick. (tho, I still can't get it working :man_shrugging:)

foxpy commented 3 years ago

I still can't get it working

Amazing! Computers barely Work™

this issue should be closed

I don't have any rights in this repository so it would be very kind of You to close this issue by yourself.