Hello,
Following the documentation "4.1 Image Input Made Simple";
I'm having an exception at opening a dpx file and tiff file from simple
code:
auto in = ImageInput::open(filename); // here
if (!in) return;
Exception thrown at 0x00007FFDBEBDA388 in testhost.exe: Microsoft C++
exception: Microsoft::VisualStudio::CppUnitTestFramework::CSEException
More detailed information:
https://1drv.ms/u/s!AlUmbfQiLoTZhFQir--TvMglJ0iT
Images:
https://1drv.ms/f/s!AlUmbfQiLoTZhFKpXHJcchpi0hBY
I'm using the master version of oiio in windows with tiff 4.0.10, openexr
2.3.0, zlib 1.2.11, libpng 1.6.35, boost 1.70, libjpegturbo 2.0.3, tbb
2019.3; cmake 3.13.4, VS2017.
I'm running this in a c++ unit test, (with some c code since data will be
used in an interop context).
TEST_CLASS(DPXioTests)
{
public:
TEST_METHOD(Instance)
{
auto sut = new DPXio();
Assert::IsNotNull(sut);
}
TEST_METHOD(ReadDPX)
{
auto sut = new DPXio();
auto path =
"C:/sensomovie/C200/A011C118_19041345_CANON/A011C118_19041345_CANON_00001926.DPX";
if(!FileExist(path))
{
wstringstream s;
s << "No such file: " << path << ".";
Logger::WriteMessage(s.str().c_str());
return;
}
try
{
auto result = sut->Read(path);
Assert::IsNotNull(result);
Assert::IsTrue(result->Colors >= 3);
Assert::IsTrue(result->Height == 2160);
Assert::IsTrue(result->Width == 4096);
}
catch (Exception& e)
{
auto lastErrorID = GetLastError();
if (lastErrorID != 0)
{
LPVOID errorBuffer{};
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
nullptr, lastErrorID, MAKELANGID(LANG_NEUTRAL,
SUBLANG_DEFAULT), (LPTSTR)&errorBuffer, 0, nullptr);
wstringstream s;
s << "Exception: " << e.what() << ". ID: "<<
lastErrorID << ". Message: " << errorBuffer<< ".";
Logger::WriteMessage(s.str().c_str());
}
else
{
wstringstream s;
s << "Exception: " << e.what();
Logger::WriteMessage(s.str().c_str());
}
}
}
};
Mathieu
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org