c++ wrapper: wrapping pixel size read