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

Andy Goryachev has updated the pull request with a new target base due to a 
merge or a rebase. The incremental webrev excludes the unrelated changes 
brought in by the merge/rebase. The pull request contains six additional 
commits since the last revision:

 - error checking
 - Merge branch 'master' into 8390345.image.io
 - unused imports
 - tests
 - try with
 - image utils

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

Changes:
  - all: https://git.openjdk.org/jfx/pull/2267/files
  - new: https://git.openjdk.org/jfx/pull/2267/files/b722b6d5..1c801a2e

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jfx&pr=2267&range=04
 - incr: https://webrevs.openjdk.org/?repo=jfx&pr=2267&range=03-04

  Stats: 592 lines in 14 files changed: 415 ins; 24 del; 153 mod
  Patch: https://git.openjdk.org/jfx/pull/2267.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/2267/head:pull/2267

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

Reply via email to