On Tue, 28 Apr 2026 20:23:16 GMT, Phil Race <[email protected]> wrote:
> The previous change results in a larger destination raster. > AffineTransformOp does not always have a mapped value to write into every > destination pixel. > The native memory allocated by medialib is not zeroed out and the code in the > JDK bridge to it only zeroed out the first w*h bytes, not all channels. > > So sometimes, you'd have residual data. The fix is to zero it out. > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). src/java.desktop/share/native/libawt/awt/medialib/awt_ImagingLib.c line 1142: > 1140: > 1141: /* Perform the transformation */ > 1142: status = (*sMlibFns[MLIB_AFFINE].fptr)(dst, src, mtx, filter, > MLIB_EDGE_SRC_EXTEND); This isn't specifically related, but the way this was written it collapsed the status into being a boolean. Which made that printMedialibError() function print misleading things. Since it was adjacent I decided to fix it. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/30976#discussion_r3157011124
