ImageIO.read(...) is not really thread-safe, as calling it on several threads at the same time can cause NullPointerExceptions and ConcurrentModificationExceptions, as reported in https://bugs.openjdk.java.net/browse/JDK-8058973 and https://bugs.openjdk.java.net/browse/JDK-6986863. This commit changes all usages of this method to synchronize on ImageIO.class, so the method is never run asynchronously.