The list of methods to do Integer Clip are organized into topic(s).
int
clip(final int value) Clip a value for compare
if (value <= -1) {
return -1;
if (value >= 1) {
return 1;
return 0;
int
clip(int x) clip
if (x < 0)
return 0;
if (x > 255)
return 255;
return x;
void
clip(int[][][] data, int startX, int startY, int stopX, int stopY) This method clips the values of the pixel so that they are in the range 0-255
for (int y = startY; y < stopY; y++) {
for (int x = startX; x < stopX; x++) {
data[y][x][1] = clip(data[y][x][1]);
data[y][x][2] = clip(data[y][x][2]);
data[y][x][3] = clip(data[y][x][3]);
void
clipHistogram(final int[] hist, final int[] clippedHist, final int limit) Clip histogram and redistribute clipped entries.
System.arraycopy(hist, 0, clippedHist, 0, hist.length);
int clippedEntries = 0, clippedEntriesBefore;
do {
clippedEntriesBefore = clippedEntries;
clippedEntries = 0;
for (int i = 0; i < hist.length; ++i) {
final int d = clippedHist[i] - limit;
if (d > 0) {
...