I want to take some pictures with the Raspberry PI Camara. This works fine. But I cannot load the pictures after I've save them on the PI… Here is the code how I load the Images:
BufferedImage imgBuff = null;
try {
imgBuff = ImageIO.read(new File(saveFile + picName));
} catch (IOException e) {
e.printStackTrace();
}
PlanarImage imgPI = PlanarImage.wrapRenderedImage(imgBuff);
And here is the exception: javax.imageio.IIOException: Can't read input file! But the Image exists... Here is the code how I take the pictures:
try {
StringBuilder sb = new StringBuilder(raspistillPath);
sb.append(" -n -bm");
sb.append(" -t " + picTimeout);
sb.append(" -w " + picWidth);
sb.append(" -h " + picHeight);
sb.append(" -q " + picQuality);
sb.append(" -e " + picType);
sb.append(" -o " + saveFile + picName);
Runtime.getRuntime().exec(sb.toString());
Thread.sleep(picTimeout);
} catch (Exception e) {
System.exit(e.hashCode());
}