On Wed, Jun 16, 2010 at 10:41 PM, Kelly A <[email protected]>wrote:
> Really bursts of RAM usage of up to 10 megs for the term of an image > operation are not likely to increase RAM costs for the image API that > much. The case of uploading and image is some what infrequent and > they could impose quotas that would, force frequent users of large > memory consumption to pay. As for the case of uploading - image operations are not limited to uploading requests. Therefore I don't see how is frequency of uploading relevant to this. > Not to mention, the method you described uses the same amount of RAM to > resize the image as my process would use. > The point is not to save memory during every transformation, but to help you cope with the limit when accepting images over which size you don't have control I think it is quite elegant and easy (to implement and explain) way of 1) imposing arbitraty memory-limit while 2) still giving user a way of coping with it. The image API right now works like a building where all of the doors > are too small for the average person to pass through. > As much as the analogy is inaccurate, the doors will always cost something and there will always be persons with above average height. Luckily for taller persons the building has another doors. (You're lucky person if opening console and enabling billing is what bothers you. :) There probably has to be some limit, so Google could have chosen way of A) simply rejecting all large uploads, B) let you access their degraded version. On Jun 16, 2:40 pm, Jaroslav Záruba <[email protected]> wrote: > > On Wed, Jun 16, 2010 at 9:32 PM, Kelly A <[email protected]> > wrote: > > > So if I save an image into the blob store then load it from the blob > > > store I can work on it as long as the result is smaller than 1 > > > megabyte. > > > > > this would be extremely inefficient in my case: > > > > > 350k Jpeg stored as the primary image > > > 10k Thumbnail created from that image > > > > > I do not need to use blob store for these cases. > > > > > current process: > > > > > Get bits >> resize bits >> Save Bits > > > > > Proposed process: > > > > > Get bits >> save to Blob store >> Read from blob store >> resize bits > > > >> save bits > > > > > Since I am not storing anything larger than 1 megabyte I don't need to > > > keep the blog store around so add in a delete to delete this temporary > > > blob store item. > > > > The idea was to make images you can't load (due to their size) smaller so > > you can load them, In a way that would not bother your users. > > > > > Plus I would need to turn on billing to even get this to work. > > > > > so even though there is a work around here, I say it is still > > > desirable for the Google App team to take a look at this and see that > > > the current limitations on the Image API are not reasonable. > > > > Sure it is perfectly reasonable. Disk-space is cheap, RAM is not, working > > with images takes RAM. You want Google to buy more RAM for you but refuse > to > > pay for it. > > > > On Jun 15, 3:17 pm, Jaroslav Záruba <[email protected]> wrote: > > > > > > > > > > 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#Trans... > > > > > > 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]<google-appengine%[email protected]><google-appengine%2Bunsubscrib > [email protected]> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/google-appengine?hl=en. > > -- > 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]<google-appengine%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > > -- 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.
