Java Robot createScreenCapture performance

前端 未结 2 1834
借酒劲吻你
借酒劲吻你 2021-02-13 23:52

I need to grab a series of screenshots and concatenate them into a movie. I\'m trying to use the java Robot class to capture the screen.

But the createScreenCapture() m

2条回答
  •  时光取名叫无心
    2021-02-14 00:24

    Try experimenting with different screen settings. The colour depth will affect it as AWT has to convert everything to a common raster format.

    Some example timings from my PC:

     Resolution | Depth | Time taken 
    ------------+-------+------------
     1280x1024  | 32    | 215ms
     1280x1024  | 16    | 155ms
     1600x900   | 32    | 235ms
    

    My adapter cannot do 24bpp or 64bpp so I was unable to test with those depths, but I would guess that they would require more CPU cycles to convert.

提交回复
热议问题