Am 24.02.2017 um 19:05 schrieb Max Rietmeijer | Add to Favorites:
Worked like a charm. Great!
The image was swallowed again (mailing list security policy), but I
believe you :-)
That was some quick code, it reads the file twice. For production you
may want store it in a ByteArrayOutputStream / input stream like it is
done in the source code of PDJPegFactory.
It won't work with jai_imageio but this could be done if needed, with
code like this:
ImageInputStream iis = ImageIO.createImageInputStream(f);
ImageReader reader =
ImageIO.getImageReadersByFormatName("JPEG").next();
reader.setInput(iis);
Raster raster = reader.readRaster(0, null);
The raster can tell the width/height.
Tilman
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]