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).

modules/javafx.graphics/src/main/java/com/sun/javafx/util/ImageUtils.java line 
25:

> 23:  * questions.
> 24:  */
> 25: 

do not trust github diff: `ImgUtil` has been removed, this file contains the 
latest implementation from `SwingFXUtils`.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/2267#discussion_r3815337292

Reply via email to