Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Saving a picture/image
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
isaiahk9




PostPosted: Mon Jul 19, 2010 2:52 pm   Post subject: Saving a picture/image

Hey, I'm making a program where (in barest simplicity) the user can upload pictures (already figured out), and then save them, so that they can turn off the program, and re-open the program with the same images there. I can't just remember the file directory and re-call the images, as one of the major features of the program is so that others can see the images.

As such, I'm at a loss. I know how to save text, and all sorts of things that can be represented by text, but does anyone know how to save a picture or image?
Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: Tue Jul 20, 2010 8:01 am   Post subject: RE:Saving a picture/image

I think the best way would just be to copy the image from the original folder to a new one with all the program's images in it. I'm sure VB can do this (it'd be pretty weak if it couldn't). Something like Turing's Dir.Copy (or something).

This is, of course, assuming you're uploading to a remote server.
TheGuardian001




PostPosted: Tue Jul 20, 2010 8:29 am   Post subject: Re: Saving a picture/image

Technically any image can be shown as text. The computer doesn't care if the bytes in the file are interpreted as ASCII codes or as image pixels. You could, if you wanted to, just read and save the file as text, although I certainly don't recommend it.

If you're using the System.Drawing.Bitmap type to store your image in the program (supports bmp, jpg, tiff, png, exif, and gif files,) I believe it has a Save() method built in.
isaiahk9




PostPosted: Tue Jul 20, 2010 10:54 am   Post subject: RE:Saving a picture/image

@Insectoid: Theoretically that could work, it would just be a little inefficient with my program. However, it's a good idea as a backup if TheGuardian001's method doesn't work.
@TheGuardian001: Ty, I'll try the save method.
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: