Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to save and retrive .gif images in c#.net????
Posted
Comments
Afzaal Ahmad Zeeshan 21-Nov-14 5:31am    
Where to save, and get from where? What is the source of your images?
NaveenReddy2458 21-Nov-14 5:33am    
to database or to image list

1 solution

Loading:
C#
Image myImage = Image.FromFile(@"D:\Temp\MyPic.gif");

Saving:
C#
MyImage.Save(@"D:\Temp\MyPic2.gif", System.Drawing.Imaging.ImageFormat.Gif);
 
Share this answer
 
Comments
NaveenReddy2458 21-Nov-14 5:35am    
I want to save image to database or to image list..
aarif moh shaikh 21-Nov-14 5:45am    
System.Web.UI.WebControls.Image does Not contain a definition for 'FromFile' ???
OriginalGriff 21-Nov-14 5:50am    
:sigh:
If you don't tell us you want a database, we don;t know.
If you don't tell us you want a web based solution, we don't know.
Anything else you didn't tell us? :laugh:

For storage into a DB, see here:
http://www.codeproject.com/Tips/465950/Why-do-I-get-a-Parameter-is-not-valid-exception-wh
It shows you how to store them without errors.

Retrieving is more complex, and depends on exactly what you want to do with them.
NaveenReddy2458 21-Nov-14 5:54am    
sorry.....
I know how to save and retrieve images, but I want to knwow how to store multiple .gif images and show them on picture box???

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900