maslab.telemetry.channel
Class ImageChannel

java.lang.Object
  extended by maslab.telemetry.channel.Channel
      extended by maslab.telemetry.channel.ImageChannel

public class ImageChannel
extends Channel

Channel for publishing images to the BotClient.


Constructor Summary
ImageChannel(java.lang.String name)
          Create a new ImageChannel with compression off and downsampling=1.
ImageChannel(java.lang.String name, boolean compression)
          Create a new ImageChannel.
ImageChannel(java.lang.String name, boolean compression, int downsampling)
          Create a new ImageChannel.
 
Method Summary
 void publish(java.awt.image.BufferedImage img)
          Send an image to the BotClient, if any BotClient is connected and subscribing to this channel.
 
Methods inherited from class maslab.telemetry.channel.Channel
addCommandListener
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageChannel

public ImageChannel(java.lang.String name)
Create a new ImageChannel with compression off and downsampling=1.

Parameters:
name - The channel name.

ImageChannel

public ImageChannel(java.lang.String name,
                    boolean compression)
Create a new ImageChannel.

Parameters:
name - The channel name.
compression - If true, JPEG compression will be used. If false, no compression will be used. JPEG compression can be computationally expensive, but reduces bandwidth usage. Actually I'm lying, JPEG compression is completely disabled to make this code gcj-compatible.

ImageChannel

public ImageChannel(java.lang.String name,
                    boolean compression,
                    int downsampling)
Create a new ImageChannel.

Parameters:
name - The channel name.
compression - If true, JPEG compression will be used. If false, no compression will be used. JPEG compression can be computationally expensive, but reduces bandwidth usage. Actually I'm lying, JPEG compression is completely disabled to make this code gcj-compatible.
downsampling - Amount of downsampling to perform. 1 means no downsampling. See maslab.util.ImageUtil.downSample() for more info.
Method Detail

publish

public void publish(java.awt.image.BufferedImage img)
Send an image to the BotClient, if any BotClient is connected and subscribing to this channel.

Parameters:
img - The image to send.