Proposal: A new common Image API

Glavo zjx001202 at gmail.com
Sat Apr 19 18:09:19 UTC 2025


Hi Andrew,

To be honest, I think splitting up java.desktop might be impossible.
The APIs in this module have dependencies on each other, and I can't figure
out how to split it up without breaking compatibility.

For example, javax.imageio.ImageIO has several APIs that return a
java.awt.image.BufferedImage,
and BufferedImage::createGraphics() returns a java.awt.Graphics2D.
Considering that a package cannot be split into multiple JPMS modules, this
means that java.awt, java.awt.image,
and javax.imageio are tightly linked. Such coupling is everywhere in
java.desktop. I think splitting it is just a delusion.
I don't understand why so many people expect it. I think creating a new
module containing a new API is the pragmatic choice.

Glavo

On Sun, Apr 20, 2025 at 1:56 AM Andrew Thompson <lordpixel at mac.com> wrote:

> Reading this thread as an outsider, the things that keep coming up over
> and over again is that java.desktop needs to be modularized.
> This sounds like painstaking slow work which would doubtless requires many
> long interactions to get approvals and not offer much glory.
>
> But is that where the value really is?
>
> Andrew
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20250420/4807f7a7/attachment.htm>


More information about the openjfx-dev mailing list