Package com.lightcrafts.media.jai.codec

Examples of com.lightcrafts.media.jai.codec.ImageCodec


        // Retrieve the format.
        String format = (String)args.getObjectParameter(1);

        // Retrieve the associated ImageCodec.
        ImageCodec codec = ImageCodec.getCodec(format);

        // Check for null codec.
        if (codec == null) {
            msg.append(getName() + " " +
                       JaiI18N.getString("EncodeDescriptor4"));
            return false;
        }

        // Retrieve the ImageEncodeParam object.
        ImageEncodeParam param =
            (ImageEncodeParam)args.getObjectParameter(2);

  RenderedImage src = args.getRenderedSource(0);

        // Verify that the image can be encoded with the given parameters.
        if (!codec.canEncodeImage(src, param)) {
            msg.append(getName() + " " +
                       JaiI18N.getString("EncodeDescriptor5"));
            return false;
        }
View Full Code Here


        // Retrieve the format.
        String format = (String)args.getObjectParameter(1);

        // Retrieve the associated ImageCodec.
        ImageCodec codec = ImageCodec.getCodec(format);

        // Check for null codec.
        if (codec == null) {
            msg.append(getName() + " " +
                       JaiI18N.getString("FileStoreDescriptor4"));
            return false;
        }

        // Retrieve the ImageEncodeParam object.
        ImageEncodeParam param =
            (ImageEncodeParam)args.getObjectParameter(2);

  RenderedImage src = args.getRenderedSource(0);

        // Verify that the image can be encoded with null parameters.
        if (!codec.canEncodeImage(src, param)) {
            msg.append(getName() + " " +
                       JaiI18N.getString("FileStoreDescriptor5"));
            return false;
        }
View Full Code Here

TOP

Related Classes of com.lightcrafts.media.jai.codec.ImageCodec

Copyright © 2015 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.