RFR: 8306707: Support pluggable image loading via javax.imageio
Phil Race
prr at openjdk.org
Thu Oct 17 19:47:48 UTC 2024
On Tue, 15 Oct 2024 20:08:31 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:
> Any idea why FX has custom image loaders at all, and doesn't simply always delegate to `ImageIO` for this? If the dependency burden is high, it could be further reduced by removing built-in decoders? In other words, what's the advantage of the built-in decoders vs `ImageIO` ones?
It is true that there is duplication of functionality but the advantage is independence.
I've seen people complaining about needing java.awt.Desktop and would prefer
not to have to do that. I agree with them. FX should have its own support.
And that inevitably means duplication of functionality, but maybe duplication is
the wrong way to think about it because these toolkits are supposed to be
independent - even if they are interoperable.
In general dependencies on the the desktop module are an obstacle to making FX
an independent toolkit. We already have that situation of course, but making it
more common is the wrong direction, unless you think it an unrealistic goal
But even then, mobile & embedded uses of FX wouldn't want to always have to
drag in the desktop module.
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1593#issuecomment-2420389862
More information about the openjfx-dev
mailing list