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 »

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 »

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: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: composite -dissolve is bugged

Post by fmw42 »

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: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: composite -dissolve is bugged

Post by magick »

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: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: composite -dissolve is bugged

Post by fmw42 »

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: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: composite -dissolve is bugged

Post by magick »

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: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: composite -dissolve is bugged

Post by fmw42 »

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: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: composite -dissolve is bugged

Post by magick »

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: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: composite -dissolve is bugged

Post by fmw42 »

Thanks. I had not noticed that feature before, which is documented at your link.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: composite -dissolve is bugged

Post by magick »

In IMv6, its called compose:outside-overlay.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: composite -dissolve is bugged

Post by fmw42 »

Thanks. But there is no -define for that at https://legacy.imagemagick.org/script/c ... php#define
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: composite -dissolve is bugged

Post by magick »

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 »

The problem I originally reported has been fixed in 7.0.8.7.
Post Reply