org.jimageanalyst
Interface ImageAnalyzer

All Known Implementing Classes:
AbstractImageAnalyzer, AnalyzeBmp, AnalyzeGif, AnalyzeIco, AnalyzeIff, AnalyzeJpeg, AnalyzePcx, AnalyzePng, AnalyzePnm, AnalyzePsd, AnalyzeRas, AnalyzeSwf, AnalyzeTga, AnalyzeTiff, AnalyzeXcf

public interface ImageAnalyzer

Interface for image analyzers. All image analyzers have to implement this interface.

Version:
$LastChangedRevision: 2 $
Author:
Oliver J. Siegmar

Method Summary
 boolean detectHeader(byte[] data)
          Detect the image type.
 java.lang.String[] getFormatNames()
          Returns all format names supported by this analyzer.
 int getHeaderBufSize()
          Returns the amount of bytes required by this analyzer to detect if it is responsible for this image.
 ImageInfo getInfo(Configuration configuration, java.io.InputStream inputStream)
          Extracts the meta information for the given image.
 int getStreamStartPosition()
          Returns the position where this analyzer wants to start reading meta data.
 

Method Detail

getFormatNames

java.lang.String[] getFormatNames()
Returns all format names supported by this analyzer.

Returns:
all format names supported by this analyzer

getHeaderBufSize

int getHeaderBufSize()
Returns the amount of bytes required by this analyzer to detect if it is responsible for this image.

Returns:
the amount of bytes required by this analyzer to detect if it is responsible for this image

getStreamStartPosition

int getStreamStartPosition()
Returns the position where this analyzer wants to start reading meta data.

Returns:
the position where this analyzer wants to start reading meta data

detectHeader

boolean detectHeader(byte[] data)
Detect the image type.

Parameters:
data - the image header data
Returns:
true if this analyzer is responsible for the given image header

getInfo

ImageInfo getInfo(Configuration configuration,
                  java.io.InputStream inputStream)
                  throws java.io.IOException,
                         InvalidDataException
Extracts the meta information for the given image.

Parameters:
configuration - the configuration to be used
inputStream - the data source object
Returns:
the meta information for the given image.
Throws:
java.io.IOException - if an IO error occurs while reading data from the data source
InvalidDataException - if the image contains invalid data


Copyright © 2006-2007. All Rights Reserved.