GAE Blobstore:ImagesService.getServingUrl()为我提供了更小的图像 [英] GAE Blobstore: ImagesService.getServingUrl() gives me smaller images

查看:102
本文介绍了GAE Blobstore:ImagesService.getServingUrl()为我提供了更小的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将一些图片上传到GAE的Blobstore。上传顺利进行,当我在GAE控制台中看到图像时,我可以看到它们存储在预期的大小和分辨率中。 根据本网站,以获得上传图像的URL,我可以使用这个:



pre $ BlobKey =图片);
ImagesService imagesService = ImagesServiceFactory.getImagesService();
String imageUrl = imagesService.getServingUrl(blobKey);

结果网址指向上传图片的较小版本(大小和质量)。如何获取存储在Blobstore中的全尺寸图片的URL?

解决方案

您可以在url后添加= s0参数得到完整大小的图像。


I'm uploading some images to GAE's Blobstore. Upload goes succesfully and when i see the images in GAE console i can see that they're stored in the expected size and resolution.

According to this site, to get a URL to the uploaded image i can use this:

BlobKey blobKey = (BlobKey) blobs.get("image");
ImagesService imagesService = ImagesServiceFactory.getImagesService();
String imageUrl = imagesService.getServingUrl(blobKey);

The resulting URL points to a smaller version of the uploaded images (in size and quality). How can i get a URL to the full size image stored in Blobstore?

解决方案

you can append =s0 parameter after the url to get full sized image.

这篇关于GAE Blobstore:ImagesService.getServingUrl()为我提供了更小的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆