Examples of createCompatibleWritableRaster()


Examples of ae.java.awt.image.ColorModel.createCompatibleWritableRaster()

            height = image.getHeight(null);
        }

        ColorModel model = ColorModel.getRGBdefault();
        WritableRaster raster =
            model.createCompatibleWritableRaster(width, height);

        BufferedImage bufferedImage =
            new BufferedImage(model, raster, model.isAlphaPremultiplied(),
                              null);
View Full Code Here

Examples of ae.java.awt.image.Raster.createCompatibleWritableRaster()

            }

            ras.getPixels(minX, row, width, 1, samples);

            if (image.getColorModel().isAlphaPremultiplied()) {
                WritableRaster wr = ras.createCompatibleWritableRaster();
                wr.setPixels(wr.getMinX(), wr.getMinY(),
                             wr.getWidth(), wr.getHeight(),
                             samples);

                image.getColorModel().coerceData(wr, false);
View Full Code Here

Examples of com.google.code.appengine.awt.image.ColorModel.createCompatibleWritableRaster()

                srcCM.isAlphaPremultiplied(),
                srcCM.getTransparency(),
                srcCM.getTransferType());
       
        return new BufferedImage(dstCM,
                dstCM.createCompatibleWritableRaster(src.getWidth(), src.getHeight()),
                dstCM.isAlphaPremultiplied(),
                null);
    }

    public final BufferedImage filter(BufferedImage src, BufferedImage dst) {
View Full Code Here

Examples of com.google.code.appengine.awt.image.ComponentColorModel.createCompatibleWritableRaster()

                srcCM.isAlphaPremultiplied(),
                srcCM.getTransparency(),
                srcCM.getTransferType());
       
        return new BufferedImage(dstCM,
                dstCM.createCompatibleWritableRaster(src.getWidth(), src.getHeight()),
                dstCM.isAlphaPremultiplied(),
                null);
    }

    public final BufferedImage filter(BufferedImage src, BufferedImage dst) {
View Full Code Here

Examples of com.google.code.appengine.awt.image.Raster.createCompatibleWritableRaster()

        Raster r = pc.getRaster(x, y, w, h);
        WritableRaster wr;
        if(r instanceof WritableRaster){
            wr = (WritableRaster) r;
        }else{
            wr = r.createCompatibleWritableRaster();
            wr.setRect(r);
        }
        Surface srcSurf = new ImageSurface(pc.getColorModel(), wr);
        blitter.blit(0, 0, srcSurf, x, y, dstSurf, w, h,
                composite, null, mra);
View Full Code Here

Examples of com.jgraph.gaeawt.java.awt.image.Raster.createCompatibleWritableRaster()

    {
      wr = (WritableRaster) r;
    }
    else
    {
      wr = r.createCompatibleWritableRaster();
      wr.setRect(r);
    }
    Surface srcSurf = new ImageSurface(pc.getColorModel(), wr);
    blitter.blit(0, 0, srcSurf, x, y, dstSurf, w, h, composite, null, mra);
    srcSurf.dispose();
View Full Code Here

Examples of java.awt.image.ColorModel.createCompatibleWritableRaster()

    else
    {
      final ColorModel cm = img.getColorModel();
      final int width = img.getWidth();
      final int height = img.getHeight();
      final WritableRaster raster = cm.createCompatibleWritableRaster(width, height);
      final boolean isAlphaPremultiplied = cm.isAlphaPremultiplied();
      final Hashtable properties = new Hashtable();
      final String[] keys = img.getPropertyNames();
      if (keys != null)
      {
View Full Code Here

Examples of java.awt.image.ColorModel.createCompatibleWritableRaster()

          image = (BufferedImage)img;
      } else {
          ColorModel cm = img.getColorModel();
          int width = img.getWidth();
          int height = img.getHeight();
          WritableRaster raster = cm.createCompatibleWritableRaster(width, height);
          boolean isAlphaPremultiplied = cm.isAlphaPremultiplied();
          Hashtable<String, Object> properties = new Hashtable<String, Object>();
          String[] keys = img.getPropertyNames();
          if (keys!=null) {
              for (int i = 0; i < keys.length; i++) {
View Full Code Here

Examples of java.awt.image.ColorModel.createCompatibleWritableRaster()

        byte[] array = getPDStream().getByteArray();

//      Get the ColorModel right
        PDColorSpace colorspace = getColorSpace();
        ColorModel cm = colorspace.createColorModel( bpc );
        WritableRaster raster = cm.createCompatibleWritableRaster( width, height );
        //DataBufferByte buffer = (DataBufferByte)raster.getDataBuffer();
        DataBufferByte buffer = (DataBufferByte)raster.getDataBuffer();
        byte[] bufferData = buffer.getData();
        //System.arraycopy( array, 0, bufferData, 0, array.length );
        int predictor = getPredictor();
View Full Code Here

Examples of java.awt.image.ColorModel.createCompatibleWritableRaster()

                in = new ByteArrayInputStream( out.toByteArray() );
            }
            finalData = out.toByteArray();
        }

        WritableRaster raster = colorModel.createCompatibleWritableRaster( params.getWidth(), params.getHeight() );
        /*    Raster.createPackedRaster(
                buffer,
                params.getWidth(),
                params.getHeight(),
                params.getBitsPerComponent(),
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.