DragonDigital
November 18th, 1998, 09:19 AM
I need to find a way of transfering a Picture (that the user will just have drawn) into a Array. I can't save the image
|
Click to See Complete Forum and Search --> : Images into Arrays DragonDigital November 18th, 1998, 09:19 AM I need to find a way of transfering a Picture (that the user will just have drawn) into a Array. I can't save the image Crazy D November 19th, 1998, 02:25 AM You mean, the user draws it on a picture bos? In that case, you can try: Pictur1.Picture = Picture1.Image (maybe you need Set picture....), then you can save it with the VB function. DragonDigital November 19th, 1998, 05:16 AM Sorry, didn't make myself clear. I need to transfer a picture to a array of bytes (which gets sent to a webpage). And I can't save the picture and reload it into the array. Crazy D November 19th, 1998, 05:30 AM That makes more sence.. Actually I don't know... Never had any need to do that. Maybe you can use a memcopy? What is the source of the picture? Is that a picturebox, or something else? DragonDigital November 19th, 1998, 07:26 AM The picture is generated at runtime in a PictureBox control. I can copy this to another PictureBox or save it, but... Since I don't know the address where it's stored, I can't do a CopyMemory.... Any ideas? Crazy D November 19th, 1998, 07:30 AM Can you use Picture.Picture as source for the copy? On the other hand, if you can save the picture, you can try to read that bitmap out. It contains a few headerinfo structures (user defined types), and an array of bytes. Maybe that's an option. I haven't done that (no need to...), but it can't be that hard to do. DragonDigital November 19th, 1998, 09:27 AM I should have said: I know how to save it, but I can't this time. So no Saving! All the copy commands I have found, either take copy picture to picture or memory to memory.... I can't seem to go from Picture to memory directly. Crazy D November 20th, 1998, 03:19 AM Hmm.... I'm, not sure how to do it out of my head, but maybe you can create a compatible dc in memory, vopy the picture to that dc, and copy it from that dc into the byte-array (although, if this works, it should work when you try to copy the picture dc to the array, and I doubt that, but maybe it's worth a try). Ever been to http://www.insidetheweb.com/messageboard/mbs.cgi/mb62639 ? Messageboard about games and graphing programming, maybe you find some usefull info there. codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |