[OpenJDK 2D-Dev] Java2D - Fast(er) Image scaling using AreaAveragingScaleFilter
Simon Ge
gersimon at outlook.de
Sat Jul 7 00:13:12 UTC 2018
Hello,
My name is Simon Gerst. I am a student from Germany and "working" on image scaling.
As an assignment I have to optimize an image manipulation function for speed it does some scaling and image copying.
I am using BufferedImage.getScaledInstance(w, h, SCALE_AREA_AVERAGING) for scaling.
Profiling has shown me that the above call seems to be a bottleneck.
Looking at the source, the above call internally uses an AreaAveragingScaleFilter.
I'd be very glad if you could maybe answer me two questions:
1) Is there some kind of blog post or documentation on how the AreaAveragingScaleFilter works?
I've read the Javadoc but did not yet understand how it precisely works.
2) Are there any "obvious" performance improvements possible in the case where the input image is a BufferedImage?
I think that there might be a faster method since BufferedImage could ignore the ImageProducer stuff.
I've found this [0] blog post which suggests using another way of scaling which I unfortunately can not do.
This is my first mail to this list and I hope this is the right place for my question.
~Simon
[0] http://web.archive.org/web/20070414170207/https://today.java.net/pub/a/today/2007/04/03/perils-of-image-getscaledinstance.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20180707/6af82695/attachment.html>
More information about the 2d-dev
mailing list