简体   繁体   中英

How do I access individual pixels in an image within Google App Engine (Java)?

I need to be able to download an image from a remote web server, and then access the RGB colors of individual pixels in the image. Specifically, I need to convert the image to an int[][] where each int is the RGB encoded value of the pixel.

I assume I can grab the image by downloading it using a HttpURLConnection, and then turn it into a com.google.appengine.api.images.Image using ImageServiceFactory.makeImage().

But based on what I've seen of the GAE images API, I can't see any way to access individual pixels in this image, so I can't convert it to an int[][].

How can I do this?

The short answer is - "you can't", however I believe Google has said that they will be supporting this in the future.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM