Package com.google.appengine.api.images

Examples of com.google.appengine.api.images.Transform


    @Test
    public void testResize() throws IOException {
        assumeEnvironment(Environment.APPSPOT, Environment.CAPEDWARF);
        int resizeWidth = 150;
        int resizeHeigh = 150;
        Transform transform = ImagesServiceFactory.makeResize(resizeWidth, resizeHeigh);
        assertTransformation(transform, "Resize");
    }
View Full Code Here


    @Test
    public void testRotate() throws IOException {
        assumeEnvironment(Environment.APPSPOT, Environment.CAPEDWARF);
        int rotageDegree = 90;
        Transform transform = ImagesServiceFactory.makeRotate(rotageDegree);
        assertTransformation(transform, "Rotate");
    }
View Full Code Here

    }

    @Test
    public void testHorizontalFlip() throws IOException {
        assumeEnvironment(Environment.APPSPOT, Environment.CAPEDWARF);
        Transform transform = ImagesServiceFactory.makeHorizontalFlip();
        assertTransformation(transform, "HorizontalFlip");
    }
View Full Code Here

    }

    @Test
    public void testVerticalFlip() throws IOException {
        assumeEnvironment(Environment.APPSPOT, Environment.CAPEDWARF);
        Transform transform = ImagesServiceFactory.makeVerticalFlip();
        assertTransformation(transform, "VerticalFlip");
    }
View Full Code Here

        assumeEnvironment(Environment.APPSPOT, Environment.CAPEDWARF);
        double cropLeftX = 0.0;
        double cropTopY = 0.0;
        double cropRightX = 0.5;
        double cropBottomY = 0.5;
        Transform transform = ImagesServiceFactory.makeCrop(
            cropLeftX,
            cropTopY,
            cropRightX,
            cropBottomY
        );
View Full Code Here

    }

    @Test
    public void testFeelingLucky() throws IOException {
        assumeEnvironment(Environment.APPSPOT);
        Transform transform = ImagesServiceFactory.makeImFeelingLucky();
        assertTransformation(transform, "ImFeelingLucky");
    }
View Full Code Here

    @Test
    public void testFeelLucky() throws IOException {
        // I'm Feeling Lucky is not available in dev_appserver, CapeDwarf
        assumeEnvironment(Environment.APPSPOT);

        Transform transform = ImagesServiceFactory.makeImFeelingLucky();
        for (String sfile : FNAMES) {
            for (OutputEncoding encoding : ENCODES) {
                applyAndVerify(sfile, transform, ChkType.FLIP, encoding);
            }
        }
View Full Code Here

    }

    @Test
    public void testHorizontalFlip() throws IOException {
        ChkType chkType = ChkType.FLIP;
        Transform transform = ImagesServiceFactory.makeHorizontalFlip();
        for (String sfile : FNAMES) {
            for (OutputEncoding encoding : ENCODES) {
                applyAndVerify(sfile, transform, chkType, encoding);
            }
        }
View Full Code Here

    }

    @Test
    public void testVerticalFlip() throws IOException {
        ChkType chkType = ChkType.FLIP;
        Transform transform = ImagesServiceFactory.makeVerticalFlip();
        for (String sfile : FNAMES) {
            for (OutputEncoding encoding : ENCODES) {
                applyAndVerify(sfile, transform, chkType, encoding);
            }
        }
View Full Code Here

    @Test
    public void testResize() throws IOException {
        for (String sfile : FNAMES) {
            for (int[] exptSize : NEW_SIZES) {
                Transform transform = ImagesServiceFactory.makeResize(exptSize[0], exptSize[1]);
                for (OutputEncoding encoding : ENCODES) {
                    Image image = imagesService.applyTransform(transform, readImage(sfile), encoding);
                    assertTrue((exptSize[0] == image.getWidth()) || (exptSize[1] == image.getHeight()));
                }
            }
View Full Code Here

TOP

Related Classes of com.google.appengine.api.images.Transform

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.