On Wed, 19 Aug 2026 17:30:52 GMT, Andy Goryachev <[email protected]> wrote:

> Any internal code that needs to read/write javafx images currently goes 
> through the `ImageIO` (`java.desktop` module) and the `SwingFXUtils` (in 
> `javafx.swing` module).
> 
> To avoid adding dependencies, we should move the bulk of implementation to 
> the `javafx.graphics` module which in turn can be used by the `SwingFXUtils` 
> and other internal code without adding additional explicit dependencies.
> 
> This PR moves the `SwingFXUtils` implementation to 
> javafx.graphics/com.sun.javafx.util.ImageUtils and also adds a utility method
> 
> public static byte[] writeImage(Image im, String format) throws IOException
> 
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

This pull request has now been integrated.

Changeset: b9a34744
Author:    Andy Goryachev <[email protected]>
URL:       
https://git.openjdk.org/jfx/commit/b9a347446b5e339fb025cec90ff8459115151ee3
Stats:     957 lines in 7 files changed: 425 ins; 522 del; 10 mod

8390345: Move image I/O utility code to javafx.graphics

Reviewed-by: mhanl, kcr, psadhukhan

-------------

PR: https://git.openjdk.org/jfx/pull/2267

Reply via email to