Package com.lightcrafts.mediax.jai

Examples of com.lightcrafts.mediax.jai.RasterFormatTag


        // Add bit support?
        int sTagID = RasterAccessor.findCompatibleTag(null, srcSampleModel);
        int dTagID = RasterAccessor.findCompatibleTag(null, dstSampleModel);

        RasterFormatTag sTag = new RasterFormatTag(srcSampleModel,sTagID);
        RasterFormatTag dTag = new RasterFormatTag(dstSampleModel,dTagID);

        RasterAccessor s = new RasterAccessor(src, rect, sTag, null);
        RasterAccessor d = new RasterAccessor(dst, rect, dTag, null);

        /*int srcNumBands = s.getNumBands();
View Full Code Here


            SampleModel[] sampleModels = { getSampleModel() };
            int tagID =
                RasterAccessor.findCompatibleTag(sampleModels,
                                                 dest.getSampleModel());

            RasterFormatTag srcTag =
                new RasterFormatTag(getSampleModel(),tagID);
            RasterFormatTag dstTag =
                new RasterFormatTag(dest.getSampleModel(),tagID);

            for (int ty = startTileY; ty <= endTileY; ty++) {
                for (int tx = startTileX; tx <= endTileX; tx++) {
                    Raster tile = getTile(tx, ty);
                    Rectangle subRegion =
View Full Code Here

        // Create source accessors.
        RasterAccessor[] s = new RasterAccessor[numSources];
        for(int i = 0; i < numSources; i++) {
            if(sources[i] != null) {
                RasterFormatTag formatTag =
                    new RasterFormatTag(sources[i].getSampleModel(),
                                        formatTagID);
                s[i] = new RasterAccessor(sources[i], destRect, formatTag,
                                          null);
            }
        }

        // Create dest accessor.
        RasterAccessor d =
            new RasterAccessor(dest, destRect,
                               new RasterFormatTag(dest.getSampleModel(),
                                                   formatTagID),
                               null);

        // Create the alpha accessors.
        RasterAccessor[] a = new RasterAccessor[numSources];
        if(alphaRaster != null) {
            for(int i = 0; i < numSources; i++) {
                if(alphaRaster[i] != null) {
                    SampleModel alphaSM = alphaRaster[i].getSampleModel();
                    int alphaFormatTagID =
                        RasterAccessor.findCompatibleTag(null, alphaSM);
                    RasterFormatTag alphaFormatTag =
                        new RasterFormatTag(alphaSM, alphaFormatTagID);
                    a[i] = new RasterAccessor(alphaRaster[i], destRect, 
                                              alphaFormatTag,
                                              sourceAlpha[i].getColorModel());
                }
            }
View Full Code Here

              layout.getWidth(null), layout.getHeight(null));

        // Set the format tag if and only if we will use the RasterAccessor.
        if(getTileWidth() != getWidth() || getTileHeight() != getHeight()) {
            rasterFormatTag =
                new RasterFormatTag(getSampleModel(),
                                    RasterAccessor.TAG_BYTE_UNCOPIED);
        }

        // Grab the entire image
        this.pixels = new int[width * height];
 
View Full Code Here

        if (source2Alpha != null) {
            renderedSources[3] = source2Alpha;
            source2AlphaRaster = source2Alpha.getData(destRect);   
        }

        RasterFormatTag tags[] =
            RasterAccessor.findCompatibleTags(renderedSources, this);
        RasterAccessor s1 = new RasterAccessor(sources[0], destRect,
                                          tags[0],getSourceImage(0).getColorModel());
        RasterAccessor s2 = new RasterAccessor(sources[1], destRect,
                                          tags[1],getSourceImage(1).getColorModel());
View Full Code Here

TOP

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

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.