Fix segfault in python ImageInput.read_* functions
Fix segfault in python ImageInput.read_* functions

which happens when calling one of the ImageInput.read_* functions
without specifying a type/format.

The reason:
When not specified, the format would be TypeDesc::UNKNOWN. So, calling
format.size() to determine how much memory to allocate will (probably)
not work.

The subsequent call to the C++ read_* function will further return the
image data in the native format, which will not work together with
C_array_to_Python_array(), which assumes float if format is
TypeDesc::UNKNOWN.

This commit sets format to spec.format (i. e. the native format) if
format is TypeDesc::UNKNOWN to match the behavior of the C++ functions
(i. e. return data in native format).

sambler/oiio,mcanthony/oiio,scott-wilson/oiio,sambler/oiio,mcanthony/oiio,sambler/oiio,cwilling/oiio,cwilling/oiio,cwilling/oiio,sambler/oiio,mcanthony/oiio,OpenImageIO/oiio,scott-wilson/oiio,YangYangTL/oiio,bdeluca/oiio,bdeluca/oiio,scott-wilson/oiio,YangYangTL/oiio,OpenImageIO/oiio,cwilling/oiio,scott-wilson/oiio,mcanthony/oiio,bdeluca/oiio,micler/oiio,micler/oiio,micler/oiio,lgritz/oiio,YangYangTL/oiio,micler/oiio,lgritz/oiio,OpenImageIO/oiio,lgritz/oiio,bdeluca/oiio,lgritz/oiio,OpenImageIO/oiio,YangYangTL/oiio