Page 1 of 1

Offsets in geometry (from tutorial)

Posted: 2017-01-04T17:34:37-07:00
by tmelorc

Code: Select all

Version: ImageMagick 7.0.4-2 Q16 x86_64 2017-01-02 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP 
Delegates (built-in): bzlib freetype jng jpeg lzma png x zlib
I'm trying to learn how to use geometry features. Reading from https://www.imagemagick.org/script/comm ... p#geometry we have:

Offsets in geometry

Code: Select all

convert logo: -region '100x200+10+20' -negate wizNeg1.png
convert logo: -region '100x200-10+20' -negate wizNeg2.png
convert logo: -gravity center -region '100x200-10+20' \
  -negate wizNeg3.png
and quoting:
A negative offset can make sense in many cases. In the second example above, the offset is (-10,20), specified by -10+20. In that case, only the portion of the (virtual) rectangle obtained that lies within the image can be negated;
But I tried those 3 commands and the output is the same: the whole image was negated (I supposed that only the rectangular region should be negated).

Am I missing something?

Re: Offsets in geometry (from tutorial)

Posted: 2017-01-04T17:40:45-07:00
by snibgo
This may be a bug.

Try inserting "+region" after the negate.

Re: Offsets in geometry (from tutorial)

Posted: 2017-01-04T17:43:12-07:00
by tmelorc
snibgo wrote:This may be a bug.

Try inserting "+region" after the negate.
No progress.

Re: Offsets in geometry (from tutorial)

Posted: 2017-01-04T18:39:20-07:00
by fmw42
Is it possible that -region does not support gravity?

Re: Offsets in geometry (from tutorial)

Posted: 2017-01-04T19:02:17-07:00
by GeeMack
fmw42 wrote:Is it possible that -region does not support gravity?
Maybe. Several months ago there was a discussion found at THIS link about "-region" and IM7.

Re: Offsets in geometry (from tutorial)

Posted: 2017-01-04T19:31:43-07:00
by fmw42
Did you try using

Code: Select all

magick convert ...
Is there even gravity support for -region in IM 6?

Re: Offsets in geometry (from tutorial)

Posted: 2017-01-05T03:12:33-07:00
by tmelorc
fmw42 wrote:Did you try using

Code: Select all

magick convert ...
The same problem.

Thanks for helping and discussion but I'm only following the topic, since I have no deep knowledge to help to fix the possible bug/feature.

Regards.

Re: Offsets in geometry (from tutorial)

Posted: 2017-01-05T10:39:59-07:00
by fmw42
You could post your question about whether -region supports -gravity to the Developers or Bugs forum and see what the IM developers say.