com.sewoo.jpos.image
Class MobileImageConverter

java.lang.Object
  extended by com.sewoo.jpos.image.MobileImageConverter

public class MobileImageConverter
extends java.lang.Object

Convert Image to Byte Array.


- xL, xH, select the number of data bits (xL+xH * 256) in the horizontal direction for the bit image.
- yL, yH, select the number of data bits (yL+yH * 256) in the vertical direction for the bit image.

Version:
1.00

Constructor Summary
MobileImageConverter()
           
 
Method Summary
 byte[] convertBitImage(int[][] tpix, int thresHoldValue)
          Convert 2-dimension array to byte array.
 byte[] convertGSAsteriskImage(int[][] img, int thresHoldValue)
          Convert 2-dimension array to byte array.
 int getaX()
           
 int getaY()
           
 int getByteWidth(int iWidth)
           
 int getxH()
           
 int getxL()
           
 int getyH()
           
 int getyL()
           
 void setLength(int iWidth, int iHeight)
           
 void setLHLength(int byteWidth, int iHeight)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MobileImageConverter

public MobileImageConverter()
Method Detail

getaX

public int getaX()

getaY

public int getaY()

getxL

public int getxL()

getxH

public int getxH()

getyL

public int getyL()

getyH

public int getyH()

getByteWidth

public int getByteWidth(int iWidth)

setLHLength

public void setLHLength(int byteWidth,
                        int iHeight)

setLength

public void setLength(int iWidth,
                      int iHeight)

convertBitImage

public byte[] convertBitImage(int[][] tpix,
                              int thresHoldValue)
Convert 2-dimension array to byte array. print Raster Image Command. (GS v 0)

Parameters:
tpix - int array[][]
Returns:
byte [] - 1 Dimension Byte Array using Image print command.

convertGSAsteriskImage

public byte[] convertGSAsteriskImage(int[][] img,
                                     int thresHoldValue)
Convert 2-dimension array to byte array. print Image Command. (GS * , GS /)

Parameters:
img - int array[][]
thresHoldValue - Threshold value for convert B/W image.
Returns:
byte [] - 1 Dimension Byte Array using Image print command.