public class CalcMosaic
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
APP_NAME
The title of the application.
|
protected static java.awt.Image |
icon
The window icon.
|
Constructor and Description |
---|
CalcMosaic(java.io.File[] files,
int numRows,
boolean isSlow)
Creates a new instance of CalcMosaic, with the parameters.
|
Modifier and Type | Method and Description |
---|---|
static int[][] |
addMacroTriggers(java.awt.image.BufferedImage image,
int cellSize)
Calculates the mosaic color matrix from an image file.
|
static java.awt.Color |
getMosaicColor(java.awt.image.BufferedImage image,
int x0,
int y0,
int x1,
int y1)
Obtain the mosaic color of a block in the image.
|
static void |
main(java.lang.String[] args)
Runs CalcMosaic from the command line.
|
public static final java.lang.String APP_NAME
protected static java.awt.Image icon
public CalcMosaic(java.io.File[] files, int numRows, boolean isSlow)
files
- The image filesnumRows
- The number of rows to use, default to 0 (estimate it
automatically)isSlow
- Should we create in slow motion (for presentation)public static void main(java.lang.String[] args)
args
- the command line argumentspublic static int[][] addMacroTriggers(java.awt.image.BufferedImage image, int cellSize)
image
- the imagecellSize
- the size of the mosaic cellpublic static java.awt.Color getMosaicColor(java.awt.image.BufferedImage image, int x0, int y0, int x1, int y1)
image
- the imagex0
- the x-coordinate of the upper-left corner of the
block in the imagey0
- the y-coordinate of the upper-left corner of the
block in the imagex1
- the x-coordinate of the lower-right corner of the
block in the imagey1
- the y-coordinate of the lower-right corner of the
block in the image