src/net/java/sip/communicator/plugin/desktoputil/presence/avatar/imagepicker/WebcamDialog.java
/**
     * Grab the current image of the webcam through the MediaService
     */
Grab the current image of the webcam through the MediaService
Grab the current image of the webcam through the MediaService
private void grabSnapshot()
    {
        try
        {
            Robot robot = new Robot();
            Point location = videoContainer.getLocationOnScreen();
            BufferedImage bi = robot.createScreenCapture(new Rectangle(
                    location.x,
                    location.y,
                    videoContainer.getWidth(),
                    videoContainer.getHeight()));
            this.grabbedImage = ImageUtils.toByteArray(bi);
        }
        catch (Throwable e)
        {
            logger.error("Cannot create snapshot!", e);
        }
        close(false);
        this.setVisible(false);
    }
private void grabSnapshot ( ) { try { Robot robot = new Robot ( ) ; Point location = videoContainer . getLocationOnScreen ( ) ; BufferedImage bi = robot . createScreenCapture ( new Rectangle ( location . x , location . y , videoContainer . getWidth ( ) , videoContainer . getHeight ( ) ) ) ; this . grabbedImage = ImageUtils . toByteArray ( bi ) ; } catch ( Throwable e ) { logger . error ( "Cannot create snapshot!" , e ) ; } close ( false ) ; this . setVisible ( false ) ; }
Grab the current image of the webcam through the MediaService
Grab the current image of the webcam through the MediaService