This method lets an application create a decoded image object from an input stream.
When the decoded image object is created, it only keeps a reference to the external data source and does not immediately decode the image. The decoded image object takes over ownership of the input stream object and increments its reference count.
The application should release the stream object after the CreateImageFromStream method returns successfully.
Be aware that decoded image objects are read-only. In particular, you cannot modify the image data. However, you can display it onto a destination graphics context or push its data into an image sink. For more information, see IImage.