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.
bilinear point in percents
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: bilinear point in percents
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: bilinear point in percents
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.Anthony wrote:So Fred will it break anything of yours if I fix it now. And it probably should be fixed
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: bilinear point in percents
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.
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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: bilinear point in percents
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#p101042Anthony 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.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: bilinear point in percents
After much deliberation, I decided to leave sparse color using 'pixel coordinates' and just fix the sparse color 'mathematical gradient' examples.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.
http://www.imagemagick.org/Usage/canvas ... _gradients
This has now been done. Changes should appear soon.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/