Package com.lightcrafts.mediax.jai

Examples of com.lightcrafts.mediax.jai.KernelJAI


        BorderExtender extender = RIFUtil.getBorderExtenderHint(renderHints);
       
        RenderedImage source = paramBlock.getRenderedSource(0);

        // Get the Horizontal & Vertical kernels
        KernelJAI kern_h = (KernelJAI)paramBlock.getObjectParameter(0);
        KernelJAI kern_v = (KernelJAI)paramBlock.getObjectParameter(1);
       
        return new GradientOpImage(source,
                                   extender,
                                   renderHints,
                                   layout,
View Full Code Here


        int numMasks = ditherMask.length;
        this.dmask = new int[numMasks][];

        for(int k = 0; k < numMasks; k++) {
            KernelJAI mask = ditherMask[k];

            if(mask.getWidth() != dmaskWidth ||
               mask.getHeight() != dmaskHeight) {
                throw new IllegalArgumentException
                    (JaiI18N.getString("MlibOrderedDitherOpImage0"));
            }

            // Initialize the integral dither mask coefficients.
View Full Code Here

                                RenderingHints hints) {
        // Get source and parameters.
        RenderedImage source = args.getRenderedSource(0);
        LookupTableJAI colorMap =
            (LookupTableJAI)args.getObjectParameter(0);
        KernelJAI errorKernel = (KernelJAI)args.getObjectParameter(1);

        // Check colorMap compatibility.
        if(colorMap.getNumBands() != 1 &&
           colorMap.getNumBands() != 3) {
            // 1 or 3 band colorMaps only.
View Full Code Here

       

        RenderedImage source = paramBlock.getRenderedSource(0);
        LookupTableJAI lookupTable =
            (LookupTableJAI)paramBlock.getObjectParameter(0);
        KernelJAI kernel = (KernelJAI)paramBlock.getObjectParameter(1);

        return new ErrorDiffusionOpImage(source, renderHints, layout,
                                         lookupTable, kernel);
    }
View Full Code Here

       

        // Get BorderExtender from renderHints if any.
        BorderExtender extender = RIFUtil.getBorderExtenderHint(renderHints);

        KernelJAI unRotatedKernel =
            (KernelJAI)paramBlock.getObjectParameter(0);
        KernelJAI kJAI = unRotatedKernel.getRotatedKernel();

        int dataType =
           paramBlock.getRenderedSource(0).getSampleModel().getDataType();
        boolean dataTypeOk = (dataType == DataBuffer.TYPE_BYTE ||
                              dataType == DataBuffer.TYPE_SHORT ||
                              dataType == DataBuffer.TYPE_INT);

        if (kJAI.getWidth() == 3 && kJAI.getHeight() == 3 &&
            kJAI.getXOrigin() == 1 && kJAI.getYOrigin() == 1 &&
            dataTypeOk) {
            return new Convolve3x3OpImage(paramBlock.getRenderedSource(0),
                                          extender,
                                          renderHints,
                                          layout,
                                          kJAI);
        } else if (kJAI.isSeparable()) {
           return new SeparableConvolveOpImage(paramBlock.getRenderedSource(0),
                                               extender,
                                               renderHints,
                                               layout,
                                               kJAI);
View Full Code Here

TOP

Related Classes of com.lightcrafts.mediax.jai.KernelJAI

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.