How does google app engine manipulate image data? How can you manipulate pixel data?

牧云@^-^@ 提交于 2019-12-08 05:25:14

问题


I want to get access to the low level pixel data to complete signal processing algorithms using GAE (which elimiated the use of BufferedImages and Java.awt.image classes)

You can access the Image data by:

ImagesService imagesService = ImagesServiceFactory.getImagesService();       
Image oldImage = ImagesServiceFactory.makeImageFromBlob(blobKey);
byte[] imageData = oldImage.getImageData();

So here is the issue:

Color Images have 4 Bands (aRGB) but when you get the Image Data its a 1D byte array.

1) How does GAE store the image data into the bytes? (I imagine its just taking the 2D data and putting it into a 1D array, is it grayscale?)

2) How would you manipulate the individual color bands and pixels of the image?


回答1:


imageData in this case is the raw bytes of the entire image in whatever format the image is in, including headers, data chunks etc.

It is not the pixel data in uncompressed format.



来源:https://stackoverflow.com/questions/10018431/how-does-google-app-engine-manipulate-image-data-how-can-you-manipulate-pixel-d

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!