Hi all,
I'm working with an application like an image gallery.
This allow user select file from his computer and upload the image.
After upload the image, that image will be display in a gallery.
I save the image in blobstore, and get it by blobkey.
I wan to get a thumbnail image (that was resized from thre original image)
On server side, I try to use image api to resize te original one based
on it's blobkey, like this
===
...
public String getImageThumbnail(String imageKey) {
BlobKey blobKey = new BlobKey(imageKey);
Image oldImage = ImagesServiceFactory.makeImageFromBlob(blobKey);
/*
* can not get width anf height of "oldImage"
* then I try to get imageDate of old Image to create a new
image like this
*/
byte[] oldImageData = oldImage.getImageData();
...
Image newImage1 = ImagesServiceFactory.makeImage(oldImageData);
/*
* however
* oldImage.getImageData(); return null/""
* and cause the Exception when call this
ImagesServiceFactory.makeImage(oldImageData)
*/
...
}
===
Are there anyone had work with image api on server side, please let's me
know how to get width and height of an image that create from a blobkey
or an byte[]
Many thannks and regards,
Kelly Nguyen
--
You received this message because you are subscribed to the Google Groups "Google
App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.