I reproduced your problem properly, the reason is that you cannot construct a bitmap from a shape feature stream, maybe you have any misunderstandings on the conversion, the bitmap must to be construct from a image stream, if you forced to construct a bitmap from any other streams such as shape feature stream, obviously, it would threw the exceptions.
Please make sure it first and get the stream from a image then construct the bitmap object, also you can reference the documentation on the MSDN about Bitmap,