Per review comments from Jeremy, here I've added a public error() function to
ImageBuf so that apps can add errors to ImageBuf objects.
Hereby we adopt the convention that ImageBufAlgo functions bubble up error
messages by attaching them to their "Result" IB (in addition to returning
'false').
Prototyped this idiom for IBA::render_text and "oiiotool --text". As an
example:
$ oiiotool --create 640x480 3 -text:font=lg "Hi" -o out.tif
ERROR: -text:font=lg (Could not set font face to "lg")
If you guys like this, I will amend the pull request with such error reporting
for the rest of the IBA/oiiotool functions.
You can merge this Pull Request by running:
git pull https://github.com/lgritz/oiio lg-errors
Or you can view, comment on it, or merge it online at:
https://github.com/OpenImageIO/oiio/pull/407
-- Commit Summary --
* Beef up error reporting mechanism for ImageBuf.
* New convention for ImageBufAlgo error reporting: call error() on Result
ImageBuf.
-- File Changes --
M src/include/imagebuf.h (26)
M src/include/imageio.h (2)
M src/libOpenImageIO/imagebuf.cpp (33)
M src/libOpenImageIO/imagebufalgo.cpp (7)
M src/oiiotool/oiiotool.cpp (11)
-- Patch Links --
https://github.com/OpenImageIO/oiio/pull/407.patch
https://github.com/OpenImageIO/oiio/pull/407.diff
---
Reply to this email directly or view it on GitHub:
https://github.com/OpenImageIO/oiio/pull/407
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org