org.mobicents.protocols.smpp.util
Class ImageUtils

java.lang.Object
  extended by org.mobicents.protocols.smpp.util.ImageUtils

public final class ImageUtils
extends Object

Utility methods for working with images.

Version:
$Id: ImageUtils.java 484 2010-02-08 16:08:50Z orank $

Method Summary
static void imageToBwBitmap(BufferedImage image, ByteBuffer buffer)
          Use a BufferedImage to create black and white bitmap data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

imageToBwBitmap

public static void imageToBwBitmap(BufferedImage image,
                                   ByteBuffer buffer)
Use a BufferedImage to create black and white bitmap data. Bytes are output to the supplied buffer where each bit represents a single pixel. 0 represents a white pixel, 1 represents a black pixel. The leftmost pixel is in the most significant bit of the byte..so bit 8 of byte 0 represents the pixel at (0, 0). Bit 7 of byte 1 represents the pixel at (9, 0).

Parameters:
image - The image to create bitmap data for.
buffer - The buffer to output bitmap data to.
Throws:
SMPPRuntimeException - If there is insufficient space in the buffer to contain the bitmap data.


Copyright © 2011 Mobicents. All Rights Reserved.