Skip to content

Conversation

@ktgw0316
Copy link

No description provided.

@ktgw0316 ktgw0316 marked this pull request as ready for review October 18, 2024 06:20
Copy link
Contributor

@jodygarnett jodygarnett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aaime while this is not covered by a test, it does agree with the implementation of jai-ext AffineNearestOpImage.java.

The change was made in JAI-Ext codebase here: geosolutions-it/jai-ext@2ff26ee

Bilinear interpolation optimization on the affine operation and minor fixes

// x2 = x1 + width - 1
// y2 = y1 + height - 1
src_rect_x2 - 1, src_rect_y2 - 1,
src_rect_x2, src_rect_y2,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implementation agrees with jai-ext codebase implementation:

                    javax.media.jai.util.Range clipRange = performScanlineClipping(
                            src_rect_x1,
                            src_rect_y1,
                            // Last point in the source is
                            // x2 = x1 + width - 1
                            // y2 = y1 + height - 1
                            src_rect_x2 , src_rect_y2 , s_ix, s_iy, ifracx, ifracy,
                            dst_min_x, dst_max_x, 0, 0, 0, 0);

I note that for both implementation the comment may not be correct after the change proposed here.

@jodygarnett
Copy link
Contributor

@aaime does my review above seem on track? General approach is to compare against JAI-Ext codebase and see if the same problem has been already "fixed" in production.

Copy link
Contributor

@jodygarnett jodygarnett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revisit this change after JAI-Ext merged, it seemed to already be addressed.

@jodygarnett
Copy link
Contributor

JAI-Ext merged, please reopen if this problem still remains in 0.9.1 release.

@jodygarnett jodygarnett closed this Jan 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants