Related to the previous message, how about we do include all these checks
and put all that code in a separate function as Larry suggested, but
instead of returning true or false, this function will modify the images.
If an alpha channel is missing and we assume it should have it, we will add
one. Basically do any modification needed and prepare the images for our
original function and then call it with valid input.

Things got messy because I was putting the checks in the loops over the
image. Each time you get a pixel value from the iterator, you need to check
for all images which one has alpha and which one does not, and based on
that get the alpha from the appropriate place, etc.

Summary: I suggest we put alll input validation code in one function that
will modify the images as needed, and then call the image processing
function which will assume correct input.
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to