ImagesService imagesService = ImagesServiceFactory.getImagesService();
Image oldImage = ImagesServiceFactory.makeImageFromBlob(blobKey);
Transform crop = ImagesServiceFactory.makeCrop(dblX1, dblY1, dblX2, dblY2);
Image newImage = imagesService.applyTransform(crop, oldImage);
FileService fileService = FileServiceFactory.getFileService();
AppEngineFile file = fileService.createNewBlobFile("image/jpg");
byte[] data = newImage.getImageData();
FileWriteChannel writeChannel = fileService.openWriteChannel(file, true);
// This time we write to the channel directly
writeChannel.write(ByteBuffer.wrap(data));