/*
* CINELERRA
* Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
+ * Copyright (C) 2003-2016 Cinelerra CV contributors
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
int FileEXR::read_frame(VFrame *frame, VFrame *data)
{
+
+ try {
+
Imf::setGlobalThreadCount(file->cpus);
EXRIStream exr_stream((char*)data->get_data(), data->get_compressed_size());
Imf::InputFile file(exr_stream);
}
}
return 0;
+ } catch (const std::exception &e) {
+ std::cerr << "error reading EXR image file:" << e.what() << std::endl;
+ return 1;
+ }
}
return 0;
}
+int FileEXR::can_copy_from(Asset *asset, int64_t position)
+{
+ if(asset->format == FILE_EXR ||
+ asset->format == FILE_EXR_LIST)
+ return 1;
+
+ return 0;
+}
+
FrameWriterUnit* FileEXR::new_writer_unit(FrameWriter *writer)
{
return new EXRUnit(this, writer);