[osg-users] How to get error from readImageFile?
pmartz at skew-matrix.com
Sat Nov 14 12:05:02 PST 2009
Setting OSG_NOTIFY_LEVEL=DEBUG might display some indication of the
problem. Stepping through the code in the debugger would be the most
revealing source of information, of course.
Code-wise, you could explicitly query the ReaderWriter from the Registry
and call readImage directly. This will return a ReadResult, which gives
you something other than a pass/fail indication. You should be aware
that, in the case of failure, many plugins are known to return erroneous
or misleading ReadResult values. Unfortunately, this means you can't
trust the ReadResult to tell you the difference between, say, a
permission problem and a corrupt file.
Arve Knudsen wrote:
> I am experiencing that osgDB::readImageFile is unable to load PNGs. Is there any way I can query the error cause?
More information about the osg-users