On Tue, Jun 15, 2010 at 7:33 PM, Kelly A <[email protected]> wrote:

> Jaroslav,
>
> Yes you can save but if you call images.resize(imagebits, 100, 100) on
> an image that is greater than 1 megabyte it will throw
> "RequestTooLargeError: The request to API call images.Transform() was
> too large.".
>

http://code.google.com/appengine/docs/java/images/overview.html#Transforming_Images_from_the_Blobstore

import com.google.appengine.api.images.Image;
import com.google.appengine.api.images.ImagesService;
import com.google.appengine.api.images.ImagesServiceFactory;
import com.google.appengine.api.images.Transform;

// ...
        BlobKey blobKey;  // ...

        ImagesService imagesService = ImagesServiceFactory.getImagesService();

        Image oldImage = ImagesServiceFactory.makeImageFromBlob(blobKey);
        Transform resize = ImagesServiceFactory.makeResize(200, 300);

        Image newImage = imagesService.applyTransform(resize, oldImage);

        byte[] newImageData = newImage.getImageData();

-- 
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.

Reply via email to