我在普通 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();
}
我想在 GAE 中实现同样的目标。但它阻止了 ImageIO 类和 BufferedImage 类。 谁能告诉我 GAE 上 ImageIO 类的替代方案??
最佳答案
Google App Engine 有一组有限的图像 API,您可以找到这些 API 的文档 here .
基本操作包括裁剪、旋转、翻转、调整大小和一些颜色操作。
静态makeImage方法将从字节数组构建图像。
关于google-app-engine - 替代 GAE 上的 ImageIO 类?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17212919/