On Mon, 3 Oct 2022 21:57:17 GMT, Alexey Ivanov <[email protected]> wrote:
>> Harshitha Onkar has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> removed redundant jtreg header
>
> Out of curiosity, can this test use `BufferedImage` to render
> `JInternalFrame` into?
@aivanov-jdk Regarding saving the screen capture -
- When JIF bounds are used, a partial image of JInternalFrame (JIF) is saved.
Hence I'm using the entire JFrame bounds to capture the screenshot.
- For the screenCapture I wanted to use **BufferedImage's getScaledInstance()**
to create the scaled version (code snippet below), but experiencing issues
while saving it. Currently I'm scaling the original image and re-drawing it
using graphics object.
BufferedImage bufferedImage= robot.createScreenCapture(jFrameBounds);
Image image= bufferedImage.getScaledInstance((int) (scale *
bufferedImage.getWidth(null)),
(int) (scale * bufferedImage.getHeight(null)), Image.SCALE_DEFAULT);
-------------
PR: https://git.openjdk.org/jdk/pull/10274