Package org.apache.sanselan

Examples of org.apache.sanselan.ImageFormat


       
        // 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(
                    f.extension).equals(outputFormat))
                format = f;
        }
        if( format == null ) {
            return this.returnWithErrorMessage("Unsupported output format: "+outputFormat,null);
        } else {
            log.info("Outputing image to format: "+format.toString());
        }
       
        Map params = new HashMap();

        if(parameters!=null) {
View Full Code Here


        for (int j = 0; j < width; j ++) {
            for (int k = 0; k < height; k ++) {
                image.setRGB(j, k, randomInt(512));
            }
        }
        ImageFormat format = ImageFormat.IMAGE_FORMAT_TIFF;
        byte[] bytes = Sanselan.writeImageToBytes(image, format, Maps.newHashMap());
        return bytes;
    }
View Full Code Here

TOP

Related Classes of org.apache.sanselan.ImageFormat

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.