public final class ImageAnalyzer extends Object
| Modifier and Type | Field and Description |
|---|---|
private static org.apache.log4j.Logger |
logger
Custom class logger.
|
| Constructor and Description |
|---|
ImageAnalyzer() |
| Modifier and Type | Method and Description |
|---|---|
static byte[][] |
getByteLookUpTable(javax.media.jai.PlanarImage img)
|
static ColorModel |
getColorModel(javax.media.jai.PlanarImage img)
Returns the
ColorModel of a given PlanarImage. |
static ColorSpace |
getColorSpace(javax.media.jai.PlanarImage img)
|
static int |
getDataBufferType(javax.media.jai.PlanarImage img)
|
static IndexColorModel |
getIndexColorModel(javax.media.jai.PlanarImage img)
Returns the
IndexColorModel of a given PlanarImage. |
static int |
getNumberOfBands(javax.media.jai.PlanarImage img)
Returns the number of bands of a given
PlanarImage. |
static int |
getPixelBits(javax.media.jai.PlanarImage img)
Returns the pixel bits (e.g.
|
static Map<String,Object> |
getProperties(BufferedImage bi)
Read the most common properties of an image.
|
static Map<String,Object> |
getProperties(javax.media.jai.PlanarImage img)
Read the most common properties of an image.
|
static SampleModel |
getSampleModel(javax.media.jai.PlanarImage img)
Returns the
SampleModel of a given PlanarImage. |
static short[][] |
getShortLookUpTable(javax.media.jai.PlanarImage img)
|
static int |
getTransparency(javax.media.jai.PlanarImage img)
|
static boolean |
has1Band(javax.media.jai.PlanarImage img)
Returns whether or not a given
PlanarImage has 1
band. |
static boolean |
has3Bands(javax.media.jai.PlanarImage img)
Returns whether or not a given
PlanarImage has 3
bands. |
static boolean |
has4Bands(javax.media.jai.PlanarImage img)
Returns whether or not a given
PlanarImage has 4
bands (+ alpha). |
static boolean |
hasAlphaBand(javax.media.jai.PlanarImage img)
Returns whether or not a given
PlanarImage's ColorModel
uses the alpha band. |
static boolean |
is12Bit3Band(javax.media.jai.PlanarImage img)
Returns whether or not a given
PlanarImage is an 12bit three band
image without an alpha band. |
static boolean |
is12Bit4Band(javax.media.jai.PlanarImage img)
Returns whether or not a given
PlanarImage is an 12bit four band
image with an alpha band. |
static boolean |
is12BitGrey(javax.media.jai.PlanarImage img)
Returns whether or not a given
PlanarImage is an 12bit grey value
single band image without an alpha band. |
static boolean |
is16Bit3Band(javax.media.jai.PlanarImage img)
Returns whether or not a given
PlanarImage is an 16bit three band
image without an alpha band. |
static boolean |
is16Bit4Band(javax.media.jai.PlanarImage img)
Returns whether or not a given
PlanarImage is an 16bit four band
image with an alpha band. |
static boolean |
is16BitGrey(javax.media.jai.PlanarImage img)
Returns whether or not a given
PlanarImage is an 16bit grey value
single band image without an alpha band. |
static boolean |
is8Bit3Band(javax.media.jai.PlanarImage img)
Returns whether or not a given
PlanarImage is an 8bit three band
image without an alpha band. |
static boolean |
is8Bit4Band(javax.media.jai.PlanarImage img)
Returns whether or not a given
PlanarImage is an 8bit four band
image with an alpha band. |
static boolean |
is8BitGrey(javax.media.jai.PlanarImage img)
Returns whether or not a given
PlanarImage is an 8bit grey value
single band image without an alpha band. |
static boolean |
isBinary(javax.media.jai.PlanarImage img)
Returns whether or not a given
PlanarImage is an binary (1bit)
value single band image without an alpha band. |
static boolean |
isIndexed(javax.media.jai.PlanarImage img)
|
static boolean |
isRGB(javax.media.jai.PlanarImage img) |
static void |
main(String[] args) |
static String |
printProperties(javax.media.jai.PlanarImage pi)
Print out the most common properties of an image as HTML string.
|
public static Map<String,Object> getProperties(BufferedImage bi)
bi - - the RenderedImage to analyzeString key-value pairs containing the image's
information.public static Map<String,Object> getProperties(javax.media.jai.PlanarImage img)
img - - the PlanarImage to analyzepublic static String printProperties(javax.media.jai.PlanarImage pi)
Each property is represented by a single row in an HTML table.
pi - - the PlanarImage to analyzepublic static SampleModel getSampleModel(javax.media.jai.PlanarImage img)
SampleModel of a given PlanarImage.img - public static int getDataBufferType(javax.media.jai.PlanarImage img)
img - public static int getNumberOfBands(javax.media.jai.PlanarImage img)
PlanarImage.img - public static ColorModel getColorModel(javax.media.jai.PlanarImage img)
ColorModel of a given PlanarImage.img - public static boolean isIndexed(javax.media.jai.PlanarImage img)
img - true if indexed, false otherwisepublic static IndexColorModel getIndexColorModel(javax.media.jai.PlanarImage img)
IndexColorModel of a given PlanarImage.img - null, if the ColorModel is not
IndexColorModelpublic static byte[][] getByteLookUpTable(javax.media.jai.PlanarImage img)
img - null, if the given image's ColorModel is not
of IndexColorModel.public static short[][] getShortLookUpTable(javax.media.jai.PlanarImage img)
img - null, if the given image's ColorModel is not
of IndexColorModel.public static ColorSpace getColorSpace(javax.media.jai.PlanarImage img)
img - public static boolean isRGB(javax.media.jai.PlanarImage img)
public static int getPixelBits(javax.media.jai.PlanarImage img)
PlanarImage's
ColorModel.img - public static boolean has1Band(javax.media.jai.PlanarImage img)
PlanarImage has 1
band.img - true if the image has 1 band, false if
notpublic static boolean has3Bands(javax.media.jai.PlanarImage img)
PlanarImage has 3
bands.img - true if the image has 3 bands, false if
notpublic static boolean has4Bands(javax.media.jai.PlanarImage img)
PlanarImage has 4
bands (+ alpha).img - true if the image has 4 bands, false if
notpublic static boolean hasAlphaBand(javax.media.jai.PlanarImage img)
PlanarImage's ColorModel
uses the alpha band.img - true if the image uses the alpha channel,
false if notpublic static boolean isBinary(javax.media.jai.PlanarImage img)
PlanarImage is an binary (1bit)
value single band image without an alpha band.img - true if the image has a single 1bit value band,
false if notpublic static int getTransparency(javax.media.jai.PlanarImage img)
img - null if the image's color model has no transparencypublic static boolean is8BitGrey(javax.media.jai.PlanarImage img)
PlanarImage is an 8bit grey value
single band image without an alpha band.img - true if the image has a single 8bit grey value band,
false if notpublic static boolean is12BitGrey(javax.media.jai.PlanarImage img)
PlanarImage is an 12bit grey value
single band image without an alpha band.img - true if the image has a single 12bit grey value
band, false if notpublic static boolean is16BitGrey(javax.media.jai.PlanarImage img)
PlanarImage is an 16bit grey value
single band image without an alpha band.img - true if the image has a single 16bit grey value
band, false if notpublic static boolean is8Bit3Band(javax.media.jai.PlanarImage img)
PlanarImage is an 8bit three band
image without an alpha band.img - true if the image has 3 bands using 8bit values
each, false if notpublic static boolean is12Bit3Band(javax.media.jai.PlanarImage img)
PlanarImage is an 12bit three band
image without an alpha band.img - true if the image has 3 bands using 12bit values
each, false if notpublic static boolean is16Bit3Band(javax.media.jai.PlanarImage img)
PlanarImage is an 16bit three band
image without an alpha band.img - true if the image has 3 bands using 16bit values
each, false if notpublic static boolean is8Bit4Band(javax.media.jai.PlanarImage img)
PlanarImage is an 8bit four band
image with an alpha band.img - true if the image has 4 bands using 8bit values
each, false if notpublic static boolean is12Bit4Band(javax.media.jai.PlanarImage img)
PlanarImage is an 12bit four band
image with an alpha band.img - true if the image has 4 bands using 12bit values
each, false if notpublic static boolean is16Bit4Band(javax.media.jai.PlanarImage img)
PlanarImage is an 16bit four band
image with an alpha band.img - true if the image has 4 bands using 16bit values
each, false if notpublic static void main(String[] args)
Copyright © 2009–2017 Helmut Ahammer, Philipp Kainz. All rights reserved.