Page 2 of 2
Re: bilinear point in percents
Posted: 2013-07-22T23:06:40-07:00
by anthony
Hmmm looking at IMv6 code... I don't see any conversions of pixel coordinates to image coordinates for the calculations!
That seems to indicate that I have only been using pixel coordinates for sparse color lookup!
Same is the case for IMv7.
Looks like it is a major mistake in the code from the start for sparse color, Probably an initial error that while fixed for distort was never fixed for sparse color. It is strange that I just never notice that it was wrong in my examples for perfect gradients!
But then I was concentrating on white, not black in those examples.
So the question becomes... Should sparse color use pixel coordinates or image coordinates?
For this operation pixel coordinates may work better.
Re: bilinear point in percents
Posted: 2013-07-22T23:11:27-07:00
by fmw42
Anthony wrote:So Fred will it break anything of yours if I fix it now. And it probably should be fixed
I don't think it will make much difference in my scripts. Only 4 are affected. Let me know whenever they are fixed (no rush) in a beta and I will double check and make mods as needed.
Re: bilinear point in percents
Posted: 2013-07-23T00:01:20-07:00
by anthony
Note certain I will fix... More often than not for sparse color, you are actually wanting to set specific pixels specific colors. Its purpose was to generage more '2-dientional freeform' gradients, than was otherwise posible. basically gradients that was being generated using slow FX expressions.
Which is why I posed the question, rather than just directly fix it.
It just means I need to adjust the 'perfect gradient' examples. Though really the example are not really wrong, just not described correctly. I also will have to specifically point out that it uses pixel coordinates, and not image coordinates are distort uses.
This does not mean I will change distort. It really does need to use image coordinates.
This does not mean I don't want to add some special 'hole-filling' morphology functions (like color-diffusion). Which needs a 'mask' or at least a 'alpha mask', or even a 'read-protect mask' as part of its handling.
Re: bilinear point in percents
Posted: 2013-07-23T09:34:03-07:00
by fmw42
Anthony wrote:This does not mean I don't want to add some special 'hole-filling' morphology functions (like color-diffusion). Which needs a 'mask' or at least a 'alpha mask', or even a 'read-protect mask' as part of its handling.
I think a more useful approach would be inpainting. There is free code available. Not sure of the licensing issues. But see
viewtopic.php?f=22&t=23795#p101042
Re: bilinear point in percents
Posted: 2013-08-04T18:26:17-07:00
by anthony
anthony wrote:Note certain I will fix... More often than not for sparse color, you are actually wanting to set specific pixels specific colors. Its purpose was to generage more '2-dientional freeform' gradients, than was otherwise posible. basically gradients that was being generated using slow FX expressions.
After much deliberation, I decided to leave sparse color using 'pixel coordinates' and just fix the sparse color 'mathematical gradient' examples.
http://www.imagemagick.org/Usage/canvas ... _gradients
This has now been done. Changes should appear soon.