Package org.mapfish.print.test.util

Examples of org.mapfish.print.test.util.ImageSimilarity


//      Files.copy(new File(layerGraphics.get(0)), new File("/tmp/0_"+getClass().getSimpleName()+".tiff"));
//      Files.copy(new File(layerGraphics.get(1)), new File("/tmp/1_"+getClass().getSimpleName()+".tiff"));
       
        final BufferedImage referenceImage = ImageSimilarity.mergeImages(layerGraphics, 630, 294);
        new ImageSimilarity(referenceImage, 2)
                .assertSimilarity(getFile(BASE_DIR + "expectedSimpleImage.tiff"), 20);
    }
View Full Code Here


        List<URI> layerGraphics = (List<URI>) values.getObject("overviewMapLayerGraphics", List.class);
        assertEquals(3, layerGraphics.size());

        final BufferedImage actualImage = ImageSimilarity.mergeImages(layerGraphics, 300, 200);
//        ImageIO.write(actualImage, "tiff", new File("e:/tmp/expectedSimpleImage.tiff"));
        new ImageSimilarity(actualImage, 2)
                .assertSimilarity(getFile(BASE_DIR + "expectedSimpleImage.tiff"), 50);

    }
View Full Code Here

        assertEquals(outputNamePrefix + year + ".png", fileName);

        final BufferedImage reportAsImage = ImageIO.read(new ByteArrayInputStream(report));

        new ImageSimilarity(reportAsImage, 2).assertSimilarity(getFile(MapPrinterServletTest.class, "expectedSimpleImage.png"), 10);
        return report;
    }
View Full Code Here

        assertEquals(2, layerGraphics.size());

        final BufferedImage actualImage = ImageSimilarity.mergeImages(layerGraphics, 630, 294);
//        ImageIO.write(actualImage, "png", new File("e:/tmp/expectedSimpleImage-no-bounds.png"));
        File expectedImage = getFile(BASE_DIR + "/expectedSimpleImage-no-bounds.png");
        new ImageSimilarity(actualImage, 2).assertSimilarity(expectedImage, 50);
    }
View Full Code Here

                new Dimension(200, 200), "file://" + getFile(BASE_DIR + "NorthArrow.png").toString(),
                this.bgColor, 0.0, getTaskDirectory(), this.requestFactoryWrapper);

//        FileUtils.copyFile(new File(file), new File("/tmp/north-arrow.tiff"));
//        ImageSimilarity.writeUncompressedImage(ImageIO.read(new File(file)), "/tmp/expected-north-arrow-png-square-down.tiff");
        new ImageSimilarity(new File(file), 2).assertSimilarity(getFile(BASE_DIR + "expected-north-arrow-png-square-down.tiff"), 0);
    }
View Full Code Here

                new Dimension(50, 50), "file://" + getFile(BASE_DIR + "NorthArrow.png").toString(),
                this.bgColor, 0.0, getTaskDirectory(), this.requestFactoryWrapper);

//        FileUtils.copyFile(new File(file), new File("/tmp/north-arrow.tiff"));
//        ImageSimilarity.writeUncompressedImage(ImageIO.read(new File(file)), "/tmp/expected-north-arrow-png-square-up.tiff");
        new ImageSimilarity(new File(file), 2).assertSimilarity(getFile(BASE_DIR + "expected-north-arrow-png-square-up.tiff"), 0);
    }
View Full Code Here

                new Dimension(200, 200), "file://" + getFile(BASE_DIR + "NorthArrow.png").toString(),
                this.bgColor, 45.0, getTaskDirectory(), this.requestFactoryWrapper);

//        FileUtils.copyFile(new File(file), new File("/tmp/north-arrow.tiff"));
//        ImageSimilarity.writeUncompressedImage(ImageIO.read(new File(file)), "/tmp/expected-north-arrow-png-square-45-down.tiff");
        new ImageSimilarity(new File(file), 2).assertSimilarity(getFile(BASE_DIR + "expected-north-arrow-png-square-45-down.tiff"), 0);
    }
View Full Code Here

                new Dimension(50, 50), "file://" + getFile(BASE_DIR + "NorthArrow.png").toString(),
                this.bgColor, 45.0, getTaskDirectory(), this.requestFactoryWrapper);

//        FileUtils.copyFile(new File(file), new File("/tmp/north-arrow.tiff"));
//        ImageSimilarity.writeUncompressedImage(ImageIO.read(new File(file)), "/tmp/expected-north-arrow-png-square-45-up.tiff");
        new ImageSimilarity(new File(file), 2).assertSimilarity(getFile(BASE_DIR + "expected-north-arrow-png-square-45-up.tiff"), 0);
    }
View Full Code Here

                new Dimension(200, 200), "file://" + getFile(BASE_DIR + "NorthArrow_10.png").toString(),
                this.bgColor, 0.0, getTaskDirectory(), this.requestFactoryWrapper);

//        FileUtils.copyFile(new File(file), new File("/tmp/north-arrow.tiff"));
//        ImageSimilarity.writeUncompressedImage(ImageIO.read(new File(file)), "/tmp/expected-north-arrow_10-png-nosquare-down.tiff");
        new ImageSimilarity(new File(file), 2).assertSimilarity(getFile(BASE_DIR + "expected-north-arrow_10-png-nosquare-down.tiff"), 0);
    }
View Full Code Here

                new Dimension(50, 50), "file://" + getFile(BASE_DIR + "NorthArrow_10.png").toString(),
                this.bgColor, 0.0, getTaskDirectory(), this.requestFactoryWrapper);

//        FileUtils.copyFile(new File(file), new File("/tmp/north-arrow.tiff"));
//        ImageSimilarity.writeUncompressedImage(ImageIO.read(new File(file)), "/tmp/expected-north-arrow_10-png-nosquare-up.tiff");
        new ImageSimilarity(new File(file), 2).assertSimilarity(getFile(BASE_DIR + "expected-north-arrow_10-png-nosquare-up.tiff"), 0);
    }
View Full Code Here

TOP

Related Classes of org.mapfish.print.test.util.ImageSimilarity

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.