// We're performing some kind of Engine export:
Engine engine = doc.getEngine();
ImageExportOptions export =
SaveOptions.getExportOptions(options);
OtherApplication app = (OtherApplication)doc.getSource();
// Mangle LZN and add it to the export options as appropriate:
if (options.isSidecarJpeg() || options.isSidecarTiff()) {
if (app instanceof LightroomApplication) {
File file = LightroomApplication.getOriginalFile(
options.getFile()
);
mangleLznSidecarFile(xml,file);
}
addLznMetadata(export, xml);
}
else if (options.isMultilayerTiff()) {
mangleLznMultilayerTiff(xml);
addLznMetadata(export, xml);
}
String message = LOCALE.get("SavingMessage");
if (app != null && app != UnknownApplication.INSTANCE &&
saveDirectly) {
String name = app.getName();
message = LOCALE.get("SavingToMessage", name);
}
if (progress != null) {
export(engine, export, progress);
return true;