net.sourceforge.jiu.util
Class ArrayScaling
java.lang.Objectnet.sourceforge.jiu.util.ArrayScaling
public class ArrayScaling
extends java.lang.Object
This class currently only scales up an image given as a one-dimensional array
of values.
Note: This class should be adjusted if Java ever supports genericity.
It could then work on all kinds of arrays.
static void | scaleUp200Percent(byte[] data, int width, int height)- Scales up the argument image by factor 2 in both directions.
|
ArrayScaling
private ArrayScaling()
scaleUp200Percent
public static final void scaleUp200Percent(byte[] data,
int width,
int height)
throws IllegalArgumentException Scales up the argument image by factor 2 in both directions.
It is assumed that the first 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 0