On Thu, 20 Aug 2026 13:39:06 GMT, Marius Hanl <[email protected]> wrote:

>> Andy Goryachev has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   try with
>
> modules/javafx.graphics/src/main/java/com/sun/javafx/util/ImageUtils.java 
> line 316:
> 
>> 314:      * @throws IOException
>> 315:      */
>> 316:     public static byte[] writeImage(Image im, String format) throws 
>> IOException {
> 
> I wonder if there is a way to write bytes from a JavaFX `Image` without using 
> the Swing `BufferedImage`

We don't have any code in JavaFX that does image writing. If we ever get to the 
point where this is the last thing that stops us from eliminating the 
dependency on `java.desktop`, then we could create a utility to do that 
(possibly by borrowing code from Image I/O). We would then move the rest of 
this back to `javafx.swing`, since there would no more need for the 
`BufferedImage` conversion methods to live in `javafx.graphics`.

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

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

Reply via email to