Read images with java API