1
DotNet / Image stream
« on: April 27, 2010, 11:29:07 pm »
The Image constructor accepts Stream as one of the overloads.
I have an embedded image (a png file) and I'm loading it into a stream with Assembly.GetManifestResourceStream("name");
Then I make an image from that stream but it throws an error.
Object reference not set to an instance of an object.
If I use a .bmp image then it works fine.
Is there any way to load a png image?
I have an embedded image (a png file) and I'm loading it into a stream with Assembly.GetManifestResourceStream("name");
Then I make an image from that stream but it throws an error.
Object reference not set to an instance of an object.
If I use a .bmp image then it works fine.
Is there any way to load a png image?