I used to know how to do this; in fact, I actually did it a couple years ago in a NANY app. But I can't seem to remember exactly how to go about now...
Here's what I'm trying to do, in a C# winform app:
1. load a picture (PNG, GIF, BMP, JPG) into a picturebox control
2. click Save to binary serialize the picturebox's image to disk as "myimg" (no extension)
later...
1. restart program, which opens with a picbox with no image showing
2. click the Load button to deserialize "myimg" and place the image in the picbox
I can do serialize/deserialize in a snap with strings and numbers, but for some reason I'm not remembering how to do an image. Any help?
Here's what I'm trying to do, in a C# winform app:
1. load a picture (PNG, GIF, BMP, JPG) into a picturebox control
2. click Save to binary serialize the picturebox's image to disk as "myimg" (no extension)
later...
1. restart program, which opens with a picbox with no image showing
2. click the Load button to deserialize "myimg" and place the image in the picbox
I can do serialize/deserialize in a snap with strings and numbers, but for some reason I'm not remembering how to do an image. Any help?










- carpe noctem