Package net.sourceforge.jiu.apps
Class ColorIndexer
java.lang.Object
net.sourceforge.jiu.ops.Operation
net.sourceforge.jiu.ops.BatchProcessorOperation
net.sourceforge.jiu.apps.ColorIndexer
Loads image files and generates color index information for them.
- Since:
- 0.12.0
- Author:
- Marco Schmidt
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final String[]
private int
static final int
private NumberFormat
static final int
static final int
private int
static final int
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate PixelImage
adjustColor
(PixelImage img) private PixelImage
private int[]
count
(PixelImage image) static void
void
processFile
(String inputDirectory, String inputFileName, String outputDirectory) Method to be called on each file given to this operation.private PixelImage
scale
(PixelImage in) private void
Methods inherited from class net.sourceforge.jiu.ops.BatchProcessorOperation
addDirectoryTree, addDirectoryTree, addInputFileName, addInputFileNames, getErrorMessages, getOverwrite, process, setCollectErrorMessages, setOutputDirectory, setOverwrite
Methods inherited from class net.sourceforge.jiu.ops.Operation
addProgressListener, addProgressListeners, getAbort, removeProgressListener, setAbort, setProgress, setProgress
-
Field Details
-
maxLength
private int maxLength -
contrastChange
private int contrastChange -
formatter
-
BLACK
public static final int BLACK- See Also:
-
RED
public static final int RED- See Also:
-
GREEN
public static final int GREEN- See Also:
-
BLUE
public static final int BLUE- See Also:
-
YELLOW
public static final int YELLOW- See Also:
-
MAGENTA
public static final int MAGENTA- See Also:
-
CYAN
public static final int CYAN- See Also:
-
WHITE
public static final int WHITE- See Also:
-
COLOR_NAMES
-
-
Constructor Details
-
ColorIndexer
public ColorIndexer()
-
-
Method Details
-
main
-
convertToRgb24
-
adjustColor
-
scale
-
count
-
store
-
processFile
Description copied from class:BatchProcessorOperation
Method to be called on each file given to this operation. Non-abstract heirs of this class must implement this method to add functionality.- Specified by:
processFile
in classBatchProcessorOperation
- Parameters:
inputDirectory
- name of directory where the file to be processed residesinputFileName
- name of file to be processedoutputDirectory
- output directory for that file, need not necessarily be used
-