Correcting a miss-usage of PixelEncoding instead of BitDepth.

Now setBitDepth is properly using BitDeph and as a side effects it sets PixelEncoding accordingly.