09-04-2003, 04:49 PM
I want to draw something on a pictureBox and then store that in an XML
file. Is this possible?? and if so does anyone know where I can get an
example of this?? Any help would be greatly appreciated!
09-04-2003, 04:54 PM
XML (Extended Markup Language) is a document-based system. It isn't
designed for large amounts of binary data. You could base64 encode
the bytes in the image and store that in a CDATA section.
I just wanted to point out that Base64 encoding will increase the size of the data significantly. If size is an issue, that might not be a good approach. You can call SavePicture and pass the stdpicture object of the picture box to save the data in bmp format. Of course, you could pull the data out of the picture box and compress it via GDI+ functions to jpg and other formats. Thinker is right, though, you might not want to use XML for that type of function.
09-04-2003, 05:16 PM
Thanks for the info guys. I appreciate it.