bit depth is now explicitly given.