cbr.util
Class Quantizer
java.lang.Object
cbr.util.Quantizer
- public class Quantizer
- extends Object
This class quantises the RGB888 pixels of an image
into RGB222 pixels packed into a single byte per
pixel. The two most significant bits per color band
are taken.
- Version:
- "$Id: Quantizer.java 1913 2007-08-08 02:41:53Z jpeters $"
- Author:
- Volker Roth
Constructor Summary |
private |
Quantizer()
No-one may instantiate this class. |
Method Summary |
static byte[] |
quantise(int[] px)
This method does the quantisation on an array
of integers. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Quantizer
private Quantizer()
- No-one may instantiate this class. Use the
static methods instead.
quantise
public static byte[] quantise(int[] px)
- This method does the quantisation on an array
of integers. Each integer contains one pixel
in the RGB888 format. Any Alpha channels information
is ignored. The return format consists of a byte
array. Each byte contains a quantised pixel in the
RGB222 format. The 6 least significant bits per
byte are used.
Copyright © Fraunhofer Gesellschaft. All
Rights Reserved.