Fix vector-subscript-out-of-range on MSVC Debug builds (#3517)
Fix vector-subscript-out-of-range on MSVC Debug builds (#3517)

Also fix potential problems with >31bit pixelsizes

lgritz/oiio,lgritz/oiio,lgritz/oiio,OpenImageIO/oiio,OpenImageIO/oiio,OpenImageIO/oiio,OpenImageIO/oiio,lgritz/oiio