Provide access to data offset in WritableRaster in Java 9
martijnverburg at gmail.com
Thu May 11 19:37:31 UTC 2017
Thanks for posting! This group is the right one for you to find help :-).
In this case I'd post your issue to the jigsaw-dev mailing list and see if
there's a way in the module system to get access to this API either
'legally' (within the module system) or with a special flag/configuration
that lets you bypass the safety in this case.
That list will also be the correct place to discuss providing a proper
'legal' alternative and/or discussing the solution/patch that you've
On 11 May 2017 at 20:33, Peter A <peter.abeles at gmail.com> wrote:
> Apologies since this probably not the correct list, but I'm not sure where
> else to post it.
> The high level API in a BufferedImage is very very very slow. To get
> around that problem, in previous versions of Java, the internal rasters
> which were defined in sun.awt.image were accessed. Doing so enabled
> real-time computer vision in Java.
> Accessing the low level Rasters is no longer practical in Java 9. After
> this problem was reported by one of my users I looked into it and found a
> work around, for most situations. Unfortunately the higher level
> WritableRaster does not provide access to the offset inside its internal
> data array. This makes processing of subimages impossible. My suspicion
> is that it is most likely an oversight because it provides access to every
> other piece of information needed and the raw data. It would be great
> if getDataOffset() could be moved into WritableRaster or one of its parents
> instead of being hidden in children of WritableRaster.
> I can provide a more formal write up of what I'm proposing but have no idea
> where to do it. Maybe I missed it but instructions at
> http://openjdk.java.net/contribute/ talk about submitting bug reports not
> feature requests.
> - Peter
> "Now, now my good man, this is no time for making enemies." — Voltaire
> (1694-1778), on his deathbed in response to a priest asking that he
> renounce Satan.
More information about the adoption-discuss