Page 2 of 2

Re: Recoloring images broken

Posted: 2013-05-09T09:17:11-07:00
by fmw42
I can probably go with either method, though would prefer to leave as is, since I do not know the ramification of the change on my scripts. But lets wait for Anthony to reply. I have shown that most if not all his examples will work, but he may have other considerations to factor in.

Re: Recoloring images broken

Posted: 2013-05-09T19:04:20-07:00
by anthony
No patch is my vote (keep transparency) until we can properly re-develop it to use the channel setting.


How about my question on 'alpha_blend' in IMv7 (equivalent to the 'sync' channel channel in IMv6)?

That is the swicth used to determine if -threshold does per-channel thresholding, or the default grayscaled threshold.

Re: Recoloring images broken

Posted: 2013-05-09T19:45:16-07:00
by fmw42
Anthony wrote:No patch is my vote (keep transparency) until we can properly re-develop it to use the channel setting.
That is not clear. No patch would mean to leave it as it was in the last release, which means that alpha would not be preserved. The patch was going to revert it to the way it was before IM 6.7.6.6

Please clarify.

Re: Recoloring images broken

Posted: 2013-05-09T20:11:47-07:00
by anthony
I mean. preserve the alpha.. as it was before it was changed (as it is exampled in IM examples in multiple places)
http://www.imagemagick.org/Usage/color_mods/#colorize

and last example in Masks as Colored Shapes
http://www.imagemagick.org/Usage/masking/#shapes


Note the 'blend including transparency' can be achieved using 'blend composition'.
Doing this while preserving existing alpha transparency (as -colorize) is not as easy.

On the other hand the patch version handles...
convert test.png -fill '#FF0000FF' -colorize 50% show:
convert test.png -fill '#FF000080' -colorize 50% show:
Same as if compose blend was used
BUT the very old (preserve alpha) version just uses red without semi-transparency.

I prefer the older version (reserve transparency) but with the blend effect with a semi-transparent color.
(a sort of mix of the two styles -- plus blending for the color, with a wierd type of multiplied alpha blending)
Something no other operator provides!

As such I re-iterate my previous stance....

Remove the changes to the oldest style (as showen in IM examples), until such time as operator can be re-developed properly, extending that handling to semi-transparent colors, according to the channel setting and 'sync/alpha blending' flags, which it currently ignores.