Java ImageIO.read causes OSX to freeze

I need to make a few bits with reading in an image on Mac OSX, but it seems to freeze when calling ImageIO.read (File). It seems that there are no traces of the stack, it literally just hangs. I wonder if anyone else has experienced this problem?

I was able to write an image, it just seems that this is a problem with reading. Work with .png files.

OSX 10.9.2 Java 1.7.40

+4
source share
1 answer

The solution I found at the end was to do the following on mac

File scrFile = ((TakesScreenshot)seleniumCommonHandler.getCurrentSeleniumDriver())
.getScreenshotAs(OutputType.FILE);

BufferedImage img = ImageIO.read( scrFile );

- ImageIO , , . , .

0

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


All Articles