Package java.awt.image

Examples of java.awt.image.Raster


            Iterator iter = activeTiles.iterator();
            while (iter.hasNext()) {
                Point p = (Point)iter.next();

                // Make a copy and store it in the Snapshot
                Raster tile = createTileCopy(p.x, p.y);
                snap.addTile(tile, p.x, p.y);
            }

            // Add the new Snapshot to the list of snapshots
            if (tail == null) {
View Full Code Here


        this.width = width;
        this.height = height;
        this.bands = bands;

        int tileWidth = width, tileHeight = height;
        Raster srcRaster =
           RasterFactory.createInterleavedRaster(dataType,
                                          tileWidth,tileHeight,bands,null);
        ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_sRGB);
        int bits[] = {8,8,8};
        ComponentColorModel ccm =
View Full Code Here

    /** Returns a string representation of the class object. */
    public String toString() {
        RenderedImage o = (RenderedImage) getOwner();
        String ostring = o == null ? "null" : o.toString();

        Raster t = getTile();
        String tstring = t == null ? "null" : t.toString();

        return getClass().getName() + "@" + Integer.toHexString(hashCode()) +
               ": owner = " + ostring +
               " tileX = " + Integer.toString(tileX) +
               " tileY = " + Integer.toString(tileY) +
View Full Code Here

                               WritableRaster dest,
                               Rectangle destRect) {
        // Retrieve format tags.
        RasterFormatTag[] formatTags = getFormatTags();

        Raster source = sources[0];
        Rectangle srcRect = mapDestRect(destRect, 0);


        RasterAccessor srcAccessor =
            new RasterAccessor(source, srcRect, formatTags[0],
View Full Code Here

     */
    public synchronized Raster getTile(RenderedImage owner,
                                       int tileX,
                                       int tileY) {

        Raster tile = null;

        if ( memoryCapacity == 0 ) {
            return null;
        }

View Full Code Here

            for (int y = minTy; y < maxTy; y++) {
                for (int x = minTx; x < maxTx; x++) {
                    // inline this method
                    //Raster raster = getTile(owner, x, y);
                    //************************
                    Raster raster = null;
                    Object key = SunCachedTile.hashKey(owner, x, y);
                    SunCachedTile ct = (SunCachedTile)cache.get(key);

                    if ( ct == null ) {
                        raster = null;
View Full Code Here

            JPEGCodec.createJPEGDecoder(jpegStream) :
            JPEGCodec.createJPEGDecoder(jpegStream,
                                        decodeParam);

        // Decode the compressed data into a Raster.
        Raster jpegRaster = null;
        try {
            jpegRaster = colorConvert ?
                decoder.decodeAsBufferedImage().getWritableTile(0, 0) :
                decoder.decodeAsRaster();
        } catch (IOException ioe) {
            String message = JaiI18N.getString("TIFFImage13");
            ImagingListenerProxy.errorOccurred(message,
                                   new ImagingException(message, ioe),
                                   TIFFImage.class, false);
//            throw new RuntimeException(JaiI18N.getString("TIFFImage13"));
        }

        // Translate the decoded Raster to the specified location and return.
        return jpegRaster.createTranslatedChild(minX, minY);
    }
View Full Code Here

        // this just inlines the add routine (no sync overhead for each call).
        for ( int i = 0; i < tileIndices.length; i++ ) {
            int tileX = tileIndices[i].x;
            int tileY = tileIndices[i].y;
            Raster tile = tiles[i];

            Object key = SunCachedTile.hashKey(owner, tileX, tileY);
            SunCachedTile ct = (SunCachedTile) cache.get(key);

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

          lzwDecoder.decode(data, tempData, newRect.height);

                        } else if (compression == COMP_JPEG_TTN2) {

                            stream.readFully(data, 0, byteCount);
                            Raster tempTile = decodeJPEG(data,
                                                         decodeParam,
                                                         colorConvertJPEG,
                                                         tile.getMinX(),
                                                         tile.getMinY());
                            int[] tempPixels = new int[unitsBeforeLookup];
                            tempTile.getPixels(tile.getMinX(),
                                               tile.getMinY(),
                                               tile.getWidth(),
                                               tile.getHeight(),
                                               tempPixels);
          tempData = new byte[unitsBeforeLookup];
View Full Code Here

                        ImageConsumer.SINGLEFRAME);
        }

        for (int y = minY; y < minY + height; y++) {
            rect.y = y;
            Raster row = im.getData(rect);
            row.getPixels(minX, y, width, 1, pixels);

            for (int i = 0; i < numConsumers; i++) {
                ImageConsumer ic = (ImageConsumer)consumers.elementAt(i);
                ic.setPixels(0, y - minY, width, 1, colorModel,
                             pixels, 0, scansize);
View Full Code Here

TOP

Related Classes of java.awt.image.Raster

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.