Package gwt.g2d.client.graphics.canvas

Examples of gwt.g2d.client.graphics.canvas.CanvasPixelArray


    int height = video.getVideoHeight();
    Surface surface = getPrimarySurface();
    surface.drawImage(video.getVideoElement(), 0, 0, width, height,
        0, 0, width, height)
    ImageDataAdapter frame = surface.getImageData(0, 0, width, height);
    CanvasPixelArray pixelData = frame.getPixelData();
    int l = pixelData.getLength()
 
    for (int i = 0; i < l; i += 4) { 
      int r = pixelData.getData(i + 0)
      int g = pixelData.getData(i + 1)
      int b = pixelData.getData(i + 2)
      if (g > 100 && r > 100 && b < 43) {
        pixelData.setData(i + 3, 0)
      }
    } 
    surface.putImageData(frame, 0, 0);
  }
View Full Code Here

TOP

Related Classes of gwt.g2d.client.graphics.canvas.CanvasPixelArray

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.