composite -dissolve is bugged

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
BrainwreckedTech
Posts: 3
Joined: 2018-07-12T02:13:34-07:00
Authentication code: 1152

composite -dissolve is bugged

Post by BrainwreckedTech » 2018-07-12T02:32:21-07:00

Upgrading to version 7.0.8.6, composite -dissolve is bugged

This works as expected:

Code: Select all

composite -gravity northeast -geometry +16+0 [over-image] [under-image] tiff:-
This does not:

Code: Select all

composite -dissolve 100 -gravity northeast -geometry +16+0 [over-image] [under-image] tiff:-
Version 7.0.8.5 works fine.
Last edited by BrainwreckedTech on 2018-07-12T02:38:52-07:00, edited 3 times in total.

BrainwreckedTech
Posts: 3
Joined: 2018-07-12T02:13:34-07:00
Authentication code: 1152

Re: composite --dissolve is bugged

Post by BrainwreckedTech » 2018-07-12T02:34:12-07:00

I wish I could be more detailed, but I keep having to re-login if I do. Seems to be a very short session duration. :\

User avatar
fmw42
Posts: 23648
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: composite -dissolve is bugged

Post by fmw42 » 2018-07-12T10:34:12-07:00

In Imagemagick 7, you should append composite with magick (magick composite) otherwise you are actually using IM 6.

Nevertheless, using IM 6.9.10.6 and IM 7.0.8.6 Mac OSX Sierra and trying both composite and convert syntax, the only one that works properly is IM 6 convert.


Input:
Image

Image


Code: Select all

composite -dissolve 100 -gravity northeast -geometry +16+0 lena.jpg barn.jpg result6.jpg
Image

Code: Select all

magick composite -dissolve 100 -gravity northeast -geometry +16+0 lena.jpg barn.jpg result7.jpg
Image

Code: Select all

convert barn.jpg lena.jpg -gravity northwest -geometry +16+0 -define compose:args=100,0 -compose dissolve -composite result6a.jpg
Image

Code: Select all

magick barn.jpg lena.jpg -gravity northwest -geometry +16+0 -define compose:args=100,0 -compose dissolve -composite result7a.jpg
Image

User avatar
magick
Site Admin
Posts: 10831
Joined: 2003-05-31T11:32:55-07:00

Re: composite -dissolve is bugged

Post by magick » 2018-07-14T09:59:22-07:00

Try this command:

Code: Select all

composite -dissolve 100 -gravity northeast -geometry +16+0 \
  -define compose:clip-to-self=true lena.jpg barn.jpg result7.jpg

User avatar
fmw42
Posts: 23648
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: composite -dissolve is bugged

Post by fmw42 » 2018-07-14T10:15:28-07:00

magick wrote:
2018-07-14T09:59:22-07:00
Try this command:

Code: Select all

composite -dissolve 100 -gravity northeast -geometry +16+0 \
  -define compose:clip-to-self=true lena.jpg barn.jpg result7.jpg
That does not solve the basic issue, especially with convert. If the convert command above works in IM 6 it should work in IM 7. This define was never needed before. Why should one need to add this define, now? None of my images have clip paths.

User avatar
magick
Site Admin
Posts: 10831
Joined: 2003-05-31T11:32:55-07:00

Re: composite -dissolve is bugged

Post by magick » 2018-07-14T10:50:10-07:00

There are differences between IMv6 and IMv7 per the porting guide. However, we do try to replicate IMv6 behavior in IMv7 whenever possible. We have a patch to fix the -dissolve option problem you reported. Until the patch is exported, use the -define as we proposed.

User avatar
fmw42
Posts: 23648
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: composite -dissolve is bugged

Post by fmw42 » 2018-07-14T11:36:46-07:00

Thanks. Please note that the define you mentioned is not listed at http://www.imagemagick.org/script/comma ... php#define. What is it supposed to do?

User avatar
magick
Site Admin
Posts: 10831
Joined: 2003-05-31T11:32:55-07:00

Re: composite -dissolve is bugged

Post by magick » 2018-07-14T14:05:57-07:00

See http://www.imagemagick.org/script/comma ... #composite:
Some -compose methods can modify the 'destination' image outside the overlay area. It is disabled by default. You can enable this by setting the special -set 'option:compose:clip-to-self' to 'true'.

User avatar
fmw42
Posts: 23648
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: composite -dissolve is bugged

Post by fmw42 » 2018-07-14T15:39:53-07:00

Thanks. I had not noticed that feature before, which is documented at your link.

User avatar
magick
Site Admin
Posts: 10831
Joined: 2003-05-31T11:32:55-07:00

Re: composite -dissolve is bugged

Post by magick » 2018-07-14T15:48:41-07:00

In IMv6, its called compose:outside-overlay.

User avatar
fmw42
Posts: 23648
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: composite -dissolve is bugged

Post by fmw42 » 2018-07-14T15:54:30-07:00

Thanks. But there is no -define for that at https://legacy.imagemagick.org/script/c ... php#define

User avatar
magick
Site Admin
Posts: 10831
Joined: 2003-05-31T11:32:55-07:00

Re: composite -dissolve is bugged

Post by magick » 2018-07-15T05:26:54-07:00

Fixed. Give the update a day to mirror.

BrainwreckedTech
Posts: 3
Joined: 2018-07-12T02:13:34-07:00
Authentication code: 1152

Re: composite -dissolve is bugged

Post by BrainwreckedTech » 2018-07-21T22:16:45-07:00

The problem I originally reported has been fixed in 7.0.8.7.

Post Reply