possible bug -compose blend IM 6.5.4-7 (HDRI)

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

possible bug -compose blend IM 6.5.4-7 (HDRI)

Post by fmw42 »

IM 6.5.4-7 Q16 HDRI

This works:

composite -blend 50 logo: \( -size 640x480 xc:black \) tmp1.png

Resulting image is half bright (mixed with black 50% each)


But neither of the following work. They just copy both input images to a two image output tmp2-0.png, tmp2-1.png

convert logo: \( -size 640x480 xc:black \) +swap \
-compose blend -set option:compose:args 50 tmp2.png

convert logo: \( -size 640x480 xc:black \) +swap \
-set option:compose:args 50 -compose blend tmp3.png


I have not checked to see if it works with non-hdri
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: possible bug -compose blend IM 6.5.4-7 (HDRI)

Post by magick »

Try this:
  • convert logo: \( -size 640x480 xc:black \) +swap -compose blend -set option:compose:args 50 -composite tmp2.png
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug -compose blend IM 6.5.4-7 (HDRI)

Post by fmw42 »

yes, I don't know how I missed that. :oops: But I seem to do it at times. thanks. sorry for the false alarm.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: possible bug -compose blend IM 6.5.4-7 (HDRI)

Post by anthony »

Don't worry too much about that mistake. I have made it many times myself.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug -compose blend IM 6.5.4-7 (HDRI)

Post by fmw42 »

Thanks. I think I got overwhelmed by the -set option:compose:args and just forgot about -composite.

But it is strange to me that -compose seems to be the only setting that is used by one and only one option (-composite). Just wondering why -composite is needed at all in this case. If one specified -compose then it has to be followed by -composite. Thus why can it not be automatically assumed and filled in by IM.

I understand the philosopy that there are settings that don't do anything unless followed by an option. But -compose seems different from others such as -background, -fill etc that can be used by many options.

Anyway just a thought and comment as to why I get confused from time to time on this issue.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: possible bug -compose blend IM 6.5.4-7 (HDRI)

Post by anthony »

-compose is not used ONLY by -composite

It is also used by: -flatten, -mosaic, -layers merge, -layers composite
It is also indirectly used by; -border, -frame, -extent

A complete list of known operators that use it is on the IM Examples Compose Page...
http://www.imagemagick.org/Usage/compose/#compose

Other operators also use it internally but do not use the user defined compose setting, these include GIF animation operators such as -coalesce, -dispose, and -layer optimize_frames, as well as more complex operators like -polaroid and -draw. Also the commands "compare" and "montage" make use of image composition.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply