Package eu.planets_project.services.utils

Examples of eu.planets_project.services.utils.ServicePerformanceHelper.loaded()


        }
        // If this is an embedded binary:
        try {
            imageReader = getFormatName(dob.getContent().getInputStream());
            // Record time take to load the input into memory:
            sph.loaded();

            if (imageReader == null || imageReader.getFormatName() == null)
                return returnWithErrorMessage(ServiceUtils.createErrorReport("Could not identify the image."));
           
            List<URI> types = new ArrayList<URI>();
View Full Code Here


            image = ImageIO.read( dob.getContent().getInputStream() );
        } catch ( Exception e) {
            return returnWithErrorMessage("Exception reading the image - unsupported or invalid input? ", e);
        }
        // Record time take to load the input into memory:
        sph.loaded();
       
        // If that failed, then report an error.
        if( image == null ) {
            return returnWithErrorMessage("Failed to read the image - unsupported or invalid input? ", null);
        }
View Full Code Here

        if( i1 == null || i2 == null ) {
            log.warning("One of the images was null when loaded!");
            return new CompareResult(null, ServiceUtils.createErrorReport("Error reading the images, got a NULL."));
        }
        // Record time take to load the inputs into memory:
        sph.loaded();
       
        // Check comparison is possible: Are the dimensions the same?
        if (i1.getWidth() != i2.getWidth() || i1.getHeight() != i2.getHeight()) {
            // FIXME is this really an error, or rather a 'images are different' result?
            return new CompareResult(null, ServiceUtils.createErrorReport("The image dimensions must match!"));
View Full Code Here

        } catch (IOException e) {
            return returnWithErrorMessage("IOException reading the image. ", e);
        }
       
        // Record time take to load the input into memory:
        sph.loaded();

        // Pick up the output format:
        ImageFormat format = null;
        for( ImageFormat f : ImageFormat.getAllFormats() ) {
            if (FormatRegistryFactory.getFormatRegistry().createExtensionUri(
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.