int nTargetWidth = Math.min(imInput.getWidth(),g.getClipWidth());
int nTargetHeight = Math.min(imInput.getHeight(),g.getClipHeight());
// convert the image to gray and then
// warp the image to the clipping size
RgbShrink rs = new RgbShrink(nTargetWidth, nTargetHeight);
rs.push(this.imInput);
if (this.dh != null && !this.dh.isEmpty()) {
jjil.core.Gray8Image imMask = null;
jjil.core.Image image = dh.getFront();
if (image instanceof jjil.core.Gray8Image) {