imp2 = new CompositeImage(imp2, ((CompositeImage)imp).getMode());
((CompositeImage)imp2).copyLuts(imp);
}
if (imp.isHyperStack())
imp2.setOpenAsHyperStack(true);
<BUG>if (newDepth>0 && newDepth!=oldDepth)

imp2 = (new Resizer()).zScale(imp2, newDepth, interpolationMethod);

if (imp2!=null) {</BUG>
imp2.show();

imp2 = new CompositeImage(imp2, ((CompositeImage)imp).getMode());
((CompositeImage)imp2).copyLuts(imp);
}
if (imp.isHyperStack())
imp2.setOpenAsHyperStack(true);
if (newDepth>0 && newDepth!=oldDepth) {
Resizer resizer = new Resizer();
resizer.setAverageWhenDownsizing(averageWhenDownsizing);
imp2 = resizer.zScale(imp2, newDepth, interpolationMethod);
}
if (imp2!=null) {
imp2.show();
