PxWriteImage return codes

There’s no documentation on PxWriteImage. What do the return codes
indicate? I’m getting an return code of 4.