Re: Proposal: A new common Image API

2025-04-19 Thread Glavo
Hi Andrew, To be honest, I think splitting up java.desktop might be impossible. The APIs in this module have dependencies on each other, and I can't figure out how to split it up without breaking compatibility. For example, javax.imageio.ImageIO has several APIs that return a java.awt.image.Buffe

Re: Proposal: A new common Image API

2025-04-19 Thread Glavo
ogous to: >> 1. Graphics2D >> 2. AffineTransform >> 3. PerspectiveTransform >> 4. Fonts >> 5. MultiResolutionImage >> >> - Jeremy >> >> obligatory xkcd reference: >> >> https://www.explainxkcd.com/wiki/index.php/927:_Standards >>

Re: Proposal: A new common Image API

2025-04-19 Thread Kevin Rushforth
nxkcd.com/wiki/index.php/927:_Standards -- Original Message -- From "Scott Palmer" To "Philip Race" Cc "Glavo" ; "openjfx-dev" ; client-libs-...@openjdk.org Date 4/17/2025 12:57:17 PM Subject Re: Proposal: A new com

Re: Proposal: A new common Image API

2025-04-18 Thread Glavo
Hi John, Thank you very much for your reply. I think you are actually talking about two problems: For compact storage, I think the first choice would be something like PixelBuffer. Pixels can be stored in MemorySegment. When the pixel format needs to be converted, it is easier to accelerate using

Re: Proposal: A new common Image API

2025-04-17 Thread Johan Vos
I started replying to this a couple of times, but I never finished it, because 1) there are many different angles to look at the question 2) I believe it is indeed pretty hard. However, I absolutely understand the original question, and I support the idea. The fragmentation of "image" handling is

Re: Proposal: A new common Image API

2025-04-17 Thread Scott Palmer
I think a common image I/O library that is not tied to a UI framework makes sense and is long overdue. Raster images do have a common format that encapsulates everything. We essentially have this abstracted in the two UI frameworks already. At some level it comes down to PixelFormats and data buffe

Re: Proposal: A new common Image API

2025-04-17 Thread Philip Race
First, note than John Neffenger replied to this but only on openjfx-dev and the first thing I saw was the reply and couldn't see the original. After some consternation I tracked down this cross-post. Here's a link to the reply https://mail.openjdk.org/pipermail/openjfx-dev/2025-April/053616.html

Re: Proposal: A new common Image API

2025-04-16 Thread John Neffenger
On 4/16/25 3:04 AM, Glavo wrote: * Different image APIs have to repeatedly implement support for reading the same image format (such as JPEG).   In fact, AWT, JavaFX, and Android now each implement reading JPEG images.   This is a waste. I was initially frustrated by the split between Java (A