Converting images from Blobstore

I'm trying to get image from Blobstore using blobKey But I'm getting Exception "com.google.apphosting.api.ApiProxy $ CallNotFoundException: API image packages or images 'Transform ()' could not be found".

I am passing this link to convert image

Included packages

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;

      

My code

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();

      

I am getting Exception on the 5th line of my code. HereImage newImag = imagServ.applyTransform(tran,oldImag);

+3


source to share


1 answer


How do you deploy your code? Make sure the library is in the build path and deployed correctly, then try again. I tried the exact tutorial and it worked, but I am using Eclipse.



+1


source







All Articles