jjil.algorithm.Gray322Gray8 g322g8 =
new jjil.algorithm.Gray322Gray8();
g322g8.push(image);
imMask = (Gray8Image) g322g8.getFront();
} else if (image instanceof jjil.core.RgbImage) {
RgbAvg2Gray r2g = new RgbAvg2Gray();
r2g.push(image);
imMask = (Gray8Image) r2g.getFront();
}
if (imMask != null) {
// shrink the mask to fit the display
GrayShrink gs = new GrayShrink(nTargetWidth, nTargetHeight);
gs.push(imMask);