|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjpview.io.JPEGLRGBReader
public class JPEGLRGBReader
The JPEGLRGBReader implementation provides a reader for the JPEGLRGB format, which compresses coefficient planes using a JPEG encoding
| Constructor Summary | |
|---|---|
JPEGLRGBReader(java.io.InputStream inputStream)
Creates a new instance of a JPEGLRGBReader from the given InputStream |
|
| Method Summary | |
|---|---|
static int[] |
combine(int[] green,
byte[] _blue)
Combines two coefficient planes |
static int[] |
convert(byte[] a)
Converts an array of unsigned bytes to integers |
static int |
indexOf(int question,
int[] a)
Returns the index of a given value in an array |
static java.awt.image.BufferedImage |
invert(java.awt.image.BufferedImage source)
Inverts an image - one of the help functions for unpacking the coefficient planes |
static int[] |
invert(int[] source)
Inverts a pixel buffer - used for unpacking the coefficient planes |
static void |
main(java.lang.String[] args)
Main method for testing |
PTM |
readPTM()
Calls the read procedure |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JPEGLRGBReader(java.io.InputStream inputStream)
inputStream - The input stream used to read the PTM| Method Detail |
|---|
public PTM readPTM()
throws java.io.IOException
readPTM in interface PTMReaderjava.io.IOException - If the input stream isn't readablepublic static java.awt.image.BufferedImage invert(java.awt.image.BufferedImage source)
source - the source image
public static int[] invert(int[] source)
source - the source pixel buffer
public static void main(java.lang.String[] args)
args - args[0] is the name of a JPEGLRGB filepublic static int[] convert(byte[] a)
a - the array of unsigned bytes
public static int[] combine(int[] green,
byte[] _blue)
green - the first coefficient plane_blue - the second coefficient plane
public static int indexOf(int question,
int[] a)
question - the value to look fora - the array to search
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||