![](/img/trans.png)
[英]How to I retrieve an image from a URL and store it as a Blob in Java (google app engine)
[英]How to retrieve image into the jsp from the google app engine(java)
我建议您将Blobstore中的图像作为图像服务来提供,它将为您的图像提供更好的性能,尺寸等。
请参阅下面的代码。
ImagesService services = ImagesServiceFactory.getImagesService();
ServingUrlOptions serve = ServingUrlOptions.Builder.withBlobKey(blobKey); // Blobkey of the image uploaded to BlobStore.
String url = services.getServingUrl(serve);
您将获得图像的URL,可以将其轻松放入HTML的Image标签中。
<img src="url" />
您可以从这里进一步了解AppEngine的图像服务。 GAE影像服务
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.