previous PR had lot of issues due to fix for bilinear interpolation breaking lot of tests for general worse results (only clear better results was for the opencv bilinear test).
better / worse are personal appreciation.
This PR fix resize with nearest interpolation by using transform matrix without change interpolateNearest function and adding small translation to compensate.
Changing interpolation function would break some tests but not for the best. I continue to think more work need to be done on this topic.
interpolateNearest should use floor I guess
compensate with translation may not be the best things to do
other resize interpolation should also use transform
maybe the algorithm for transform is not exactly right or be specific for each interpolation method
It's a lot of work to plan for really small, nearly impossible to see with the naked eye and lot of decision and estimation to do to actualize breaking tests or not.
Refs: https://github.com/image-js/image-js-typescript/issues/452
chirurgical fix, rework of https://github.com/image-js/image-js-typescript/pull/453
previous PR had lot of issues due to fix for bilinear interpolation breaking lot of tests for general worse results (only clear better results was for the opencv bilinear test).
better / worse are personal appreciation.
This PR fix resize with nearest interpolation by using transform matrix without change
interpolateNearest
function and adding small translation to compensate. Changing interpolation function would break some tests but not for the best. I continue to think more work need to be done on this topic.It's a lot of work to plan for really small, nearly impossible to see with the naked eye and lot of decision and estimation to do to actualize breaking tests or not.