本文整理汇总了Java中com.google.appengine.api.images.OutputSettings类的典型用法代码示例。如果您正苦于以下问题:Java OutputSettings类的具体用法?Java OutputSettings怎么用?Java OutputSettings使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
OutputSettings类属于com.google.appengine.api.images包,在下文中一共展示了OutputSettings类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testResizeAsync
import com.google.appengine.api.images.OutputSettings; //导入依赖的package包/类
@Test
public void testResizeAsync() throws IOException {
InputSettings inputSettings = new InputSettings();
OutputSettings outputSettings = new OutputSettings(OutputEncoding.PNG);
Image originalImage = readImage(CAPEDWARF_PNG);
Image resizedImage = waitOnFuture(imagesService.applyTransformAsync(ImagesServiceFactory.makeResize(400, 286), originalImage));
assertEquals(400, resizedImage.getWidth());
assertEquals(286, resizedImage.getHeight());
originalImage = readImage(CAPEDWARF_PNG);
resizedImage = waitOnFuture(imagesService.applyTransformAsync(ImagesServiceFactory.makeResize(300, 286), originalImage, outputSettings));
assertEquals(300, resizedImage.getWidth());
assertEquals(215, resizedImage.getHeight());
originalImage = readImage(CAPEDWARF_PNG);
resizedImage = waitOnFuture(imagesService.applyTransformAsync(ImagesServiceFactory.makeResize(300, 286), originalImage, inputSettings, outputSettings));
assertEquals(300, resizedImage.getWidth());
assertEquals(215, resizedImage.getHeight());
originalImage = readImage(CAPEDWARF_PNG);
resizedImage = waitOnFuture(imagesService.applyTransformAsync(ImagesServiceFactory.makeResize(300, 286), originalImage, OutputEncoding.JPEG));
assertEquals(300, resizedImage.getWidth());
assertEquals(215, resizedImage.getHeight());
}
示例2: getTransformedImage
import com.google.appengine.api.images.OutputSettings; //导入依赖的package包/类
private Image getTransformedImage() {
Assumption.assertNotNull(blobKey);
Image oldImage = ImagesServiceFactory.makeImageFromBlob(blobKey);
CompositeTransform finalTransform = getCompositeTransformToApply();
OutputSettings settings = new OutputSettings(ImagesService.OutputEncoding.PNG);
return ImagesServiceFactory.getImagesService().applyTransform(finalTransform, oldImage, settings);
}
示例3: testSettings
import com.google.appengine.api.images.OutputSettings; //导入依赖的package包/类
@Test
public void testSettings() throws IOException {
Image originalImage = readImage(CAPEDWARF_PNG);
Composite c1 = ImagesServiceFactory.makeComposite(originalImage, 0, 0, 1, Composite.Anchor.BOTTOM_LEFT);
Image ci = imagesService.composite(newArrayList(c1), 200, 143, 0, new OutputSettings(OutputEncoding.JPEG));
assertImages(null, originalImage, ci);
}
示例4: testResize
import com.google.appengine.api.images.OutputSettings; //导入依赖的package包/类
@Test
public void testResize() throws IOException {
InputSettings inputSettings = new InputSettings();
OutputSettings outputSettings = new OutputSettings(OutputEncoding.PNG);
Image originalImage = readImage(CAPEDWARF_PNG);
assertEquals(200, originalImage.getWidth());
assertEquals(143, originalImage.getHeight());
originalImage = readImage(CAPEDWARF_PNG);
Image resizedImage = imagesService.applyTransform(ImagesServiceFactory.makeResize(400, 286), originalImage);
assertEquals(400, resizedImage.getWidth());
assertEquals(286, resizedImage.getHeight());
originalImage = readImage(CAPEDWARF_PNG);
resizedImage = waitOnFuture(imagesService.applyTransformAsync(ImagesServiceFactory.makeResize(400, 286), originalImage));
assertEquals(400, resizedImage.getWidth());
assertEquals(286, resizedImage.getHeight());
originalImage = readImage(CAPEDWARF_PNG);
resizedImage = imagesService.applyTransform(ImagesServiceFactory.makeResize(300, 286), originalImage, inputSettings, outputSettings);
assertEquals(300, resizedImage.getWidth());
assertEquals(215, resizedImage.getHeight());
originalImage = readImage(CAPEDWARF_PNG);
resizedImage = waitOnFuture(imagesService.applyTransformAsync(ImagesServiceFactory.makeResize(300, 286), originalImage, inputSettings, outputSettings));
assertEquals(300, resizedImage.getWidth());
assertEquals(215, resizedImage.getHeight());
originalImage = readImage(CAPEDWARF_PNG);
resizedImage = imagesService.applyTransform(ImagesServiceFactory.makeResize(400, 200), originalImage, outputSettings);
assertEquals(280, resizedImage.getWidth());
assertEquals(200, resizedImage.getHeight());
}
示例5: applyTransform
import com.google.appengine.api.images.OutputSettings; //导入依赖的package包/类
@Override
public Image applyTransform(Transform transform, Image image, OutputSettings outputSettings) {
return null;
}
示例6: applyTransformAsync
import com.google.appengine.api.images.OutputSettings; //导入依赖的package包/类
@Override
public Future<Image> applyTransformAsync(Transform transform, Image image, OutputSettings outputSettings) {
return null;
}
示例7: composite
import com.google.appengine.api.images.OutputSettings; //导入依赖的package包/类
@Override
public Image composite(Collection<Composite> composites, int i, int i2, long l, OutputSettings outputSettings) {
return null;
}