Bugfix: handle depthPixels being either grayscale or color img.