Yes, you don't have access to the dimensions of the uploaded image.
 Luckily, if you're just trying to create a thumbnail you don't need them --
the resize transformation preserves the aspect ratio automatically.  You
just need to pass in the maximum width and maximum height.

On Tue, Dec 15, 2009 at 11:28 PM, m seleron <[email protected]> wrote:

> Hi,
>
> I tried a little.
> I think that it is issue though I can try only with local.
>
> In oldImage of the return value of makeImageFromBlob,
> oldImage#imageData is null.
>
> As a result,
> I think that ImageImpl#updateDimensions is causing an exception.
> It is called in getWidth etc.
>
> thanks.
>
>
> On 12月16日, 午前9:53, Andreas Oesterer <[email protected]> wrote:
> > I'm trying to scale an image after upload (in the doPost method). The
> > blob key seems to be ok and the image is served ok after the upload.
> >
> > Image oldImage = ImagesServiceFactory.makeImageFromBlob(bk);
> > double aspectRatio = (double) oldImage.getWidth()  / (double)
> > oldImage.getHeight();
> >
> > ->
> >
> > java.lang.UnsupportedOperationException: No image data is available.
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine-java%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" 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-java?hl=en.


Reply via email to