public class ArrayScaling
extends java.lang.Object
Note: This class should be adjusted if Java ever supports genericity. It could then work on all kinds of arrays.
| Modifier | Constructor and Description |
|---|---|
private |
ArrayScaling() |
| Modifier and Type | Method and Description |
|---|---|
static void |
scaleUp200Percent(byte[] data,
int width,
int height)
Scales up the argument image by factor 2 in both directions.
|
public static final void scaleUp200Percent(byte[] data,
int width,
int height)
throws java.lang.IllegalArgumentException
width times
height values of data contain an image
(or image channel).
The pixels (or samples) are assumed to be laid out rows top-to-bottom,
within each row left-to-right.
It is further assumed that the length of the data array is
at least 4 times width times height.
This method scales up the image in data so that after the call to this
method data can be treated as an image (a channel) that has a horizontal
resolution of width * 2 and a vertical resolution of
height * 2.data - the array of pixels that form the image to be flippedwidth - the horizontal resolution of the image; must be larger than 0height - the vertical resolution of the image; must be larger than 0java.lang.IllegalArgumentException - if the arguments are invalid