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