RFR: 8306707: Support pluggable image loading via javax.imageio [v6]
Michael Strauß
mstrauss at openjdk.org
Tue Oct 22 15:59:38 UTC 2024
On Tue, 22 Oct 2024 15:55:20 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
>>> `var` helps the writer of the code, but almost never helps the reader of the code
>>
>> I fully agree with John on this.
>
>> `scanlineStride` is useful for all the `ImageFrame` constructors, or do you think recomputing it (with the risk of it being different) is still the best course of action given that AWT supplies it and might be using some other alignment/padding?
>
> I've changed it to always take the scanline stride from AWT and never recompute. Note that AWT measures the stride in "data elements", not in bytes. I've marked the points in the source code where the meaning of stride changes from "data elements" to "bytes".
> > `var` helps the writer of the code, but almost never helps the reader of the code
>
> I fully agree with John on this.
Changed as suggested.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1593#discussion_r1810997414
More information about the openjfx-dev
mailing list