Extracting image pixel values in google appengine

2019-05-06 20:48发布

I am working on google appengine to create a tool for comparing image similarity. I need to extract the pixel values of each image to perform this. Unfortunately appengine does not support the java image libs.So I am unable to proceed.

Is there any appengine safe image library in java capable of extracting image data? I saw some techniques in python but dont want to switch to python if I can do it in java somehow...

3条回答
混吃等死
2楼-- · 2019-05-06 20:52

GAEJ has its own graphic library with fairly limited features and java.awt.image.BufferedImage is a restricted class (ie, java.awt.Image is not supported and still not present in the Jre Class White List ).

There's an open issue here, that you might want to star.

EDIT:
Somebody has patched pngj to work with InputStream.(You could use it to read a PNG pixel by pixel)

查看更多
放我归山
3楼-- · 2019-05-06 20:59

can https://github.com/witwall/appengine-awt help to you? i believe it willbe enough to add theis lib as dependency to the project to make BufferedImage working (but havent' tried this yet)

查看更多
男人必须洒脱
4楼-- · 2019-05-06 21:14

The new version of pngj now an alternative pngj-sandbox.jar that only references whitelisted classes, it should run in google-app-engine.

查看更多
登录 后发表回答