Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/379.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 从Blobstore转换图像_Java_Google App Engine_Google Cloud Platform_Google Cloud Storage_Blobstore - Fatal编程技术网

Java 从Blobstore转换图像

Java 从Blobstore转换图像,java,google-app-engine,google-cloud-platform,google-cloud-storage,blobstore,Java,Google App Engine,Google Cloud Platform,Google Cloud Storage,Blobstore,我试图使用blobKey从Blobstore获取图像,但得到异常“com.google.apphosting.api.ApiProxy$CallNotFoundException:api包'images'或调用'Transform()'未找到。” 我已经提到了变换图像 包括包裹 import com.google.appengine.api.blobstore.BlobKey; import com.google.appengine.api.images.Image; import com.go

我试图使用blobKey从Blobstore获取图像,但得到异常“com.google.apphosting.api.ApiProxy$CallNotFoundException:api包'images'或调用'Transform()'未找到。”

我已经提到了变换图像

包括包裹

import com.google.appengine.api.blobstore.BlobKey;
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 = new BlobKey("nt6Qo5yvgQu9byMAQEprqA") ;           
ImagesService imagServ = ImagesServiceFactory.getImagesService();           
Image oldImag = ImagesServiceFactory.makeImageFromBlob(blobKey);            
Transform tran = ImagesServiceFactory.makeResize(200, 300);                     
Image newImag = imagServ.applyTransform(tran,oldImag);
byte[] newImagData = newImag.getImageData();

我在代码的第五行遇到异常,即这里
Image newImag=imagServ.applyTransform(tran,oldImag)

如何部署代码?请确保库位于生成路径中并且已正确部署,然后重试。我尝试了完全相同的教程,它成功了,不过我正在使用Eclipse