// If the source is a local RenderedOp, then the only way
// to access it from a remote machine is to render it and
// create a SerializableRenderedImage wrapping the
// rendering, which is set as the source of the remote op.
RenderedImage ri = ((RenderedOp)source).getRendering();
try {
SerializableRenderedImage sri =
new SerializableRenderedImage(ri);
remoteImage.setRenderedSource(opID, sri, i);
newPB.setSource(sri, i);
} catch (RemoteException e) {
String message = JaiI18N.getString("RMIServerProxy6");
listener.errorOccurred(message,
new RemoteImagingException(message, e),
this, false);
// throw new RemoteImagingException(ImageUtil.getStackTraceString(e));
}
} else if (source instanceof RenderedImage) {
// If the source is a local RenderedImage, then the only
// way to access it from a remote machine is by wrapping
// it in SerializableRenderedImage and then setting the
// SRI as the source.
RenderedImage ri = (RenderedImage)source;
try {
SerializableRenderedImage sri =
new SerializableRenderedImage(ri);
remoteImage.setRenderedSource(opID, sri, i);
newPB.setSource(sri, i);