GAE上ImageIO类的替代方案?

Ami*_*mit 6 google-app-engine java-ee zxing google-glass

我在普通J2EE应用程序中的工作示例:

// decode the image 
    InputStream inputStream = new File("/images/test.png");
    BufferedImage barCodeBufferedImage = ImageIO.read(inputStream);
    if (barCodeBufferedImage != null) {
        LuminanceSource source = new BufferedImageLuminanceSource(barCodeBufferedImage);
        BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));
        Result results = new MultiFormatReader().decode(bitmap);
        //System.out.println("Decoded barcode image :: "+results.getText());
        return results.getText();
    }
Run Code Online (Sandbox Code Playgroud)

同样我想在GAE中实现.但它阻止了ImageIO类和BufferedImage类.任何人都可以告诉我GAE上的ImageIO类的替代品吗?

Ala*_*ain 1

Google App Engine 有一组有限的图像 API,您可以在此处找到其文档。

基本操作包括裁剪、旋转、翻转、调整大小和一些颜色处理。

静态makeImage方法将从字节数组构建图像。