BufferedImage getSubimage Performance

I am working on a 2D 2D rendering program (runs on 1.6.0_11) that uses external images to display its user interface. These large images contain several graphical GUI elements, which I now retrieve using BufferedImage.getSubimage (). Assuming an average desktop system (without our DirectX / OpenGL acceleration), my questions are:

  • GetSubimage () is an efficient memory call because it shares the main image data, but does it affect the rendering speed of these auxiliary images using Graphics2D.drawImage ()?
  • If images use the 8-bit per pixel color palette mode, what will be the increase / decrease of the use of the RGBA mode (e.g. 4x memory) or the use of the color model palette (e.g. conversion time)?
+3
source share
1 answer

As far as I know, getSubimage(...)it should not have a significant impact on the rendering.

Image data conversion is slow, and it's usually best to try to avoid it on the fly.


With the slowness of the images can be divided into two categories:

  • Disk I / O
  • Data processing

And disk I / O can easily be the slowest part.

, .

, JAI , , .

+1

Source: https://habr.com/ru/post/1702545/


All Articles