Hi,
while trying to understand why some of our EXR files could not be
correctly opened by other application, i had a look in the
OpenEXROutput::open function and there's something I don't get: we do
not seem to be setting the type of the image if we have 1 subimage and
no deep image.
Here's the bit of code (L457)
std::string filetype;//L457
if (specs[0].deep)
filetype = specs[0].tile_width ? "tiledimage" :
"deepscanlineimage";
else
filetype = specs[0].tile_width ? "tiledimage" :
"scanlineimage"; //L460
bool deep = false;
for (int s = 0; s < subimages; ++s) {
if (! spec_to_header (m_subimagespecs[s], m_headers[s]))
return false;
deep |= m_subimagespecs[s].deep;
if (m_subimagespecs[s].deep != m_subimagespecs[0].deep) {
error ("OpenEXR does not support mixed deep/nondeep
multi-part image files");
return false;
}
if (subimages > 1 || deep) {//L470
bool tiled = m_subimagespecs[s].tile_width;
m_headers[s].setType (deep ? (tiled ? Imf::DEEPTILE :
Imf::DEEPSCANLINE)
: (tiled ? Imf::TILEDIMAGE :
Imf::SCANLINEIMAGE));
}
}
filetype does not seem to be used, and the values that we put into it
are exactly the ones defined by the Imf constants.
As far as I can see, we can remove L456->460, and remove the test L470.
Any thoughts ?
Michel
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org