Click here to Skip to main content
15,909,652 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
How to convert Image File from one format to another like .jpg to .gif or .jpg to .png using VB.NET?
Posted
Updated 6-Nov-11 4:36am

Yes: Load it as normal, and use the Bitmap.Save method:
VB
Dim myImage As Bitmap = DirectCast(Image.FromFile("D:\Temp\MyPic.jpg"), Bitmap)
myImage.Save("D:\Temp\MyPicSaved.png", ImageFormat.Png)
 
Share this answer
 
Comments
thatraja 6-Nov-11 11:00am    
Why 1 for this? Counter 5!
 
Share this answer
 
You can use save()method of System.drawing.image class like this:
VB
Dim SourceImg As Image
      SourceImg = Image.FromFile(SourceFilePath)
      SourceImg.Save(DesFilepath, Imaging.ImageFormat.Png)


following article match your requirement, see this for more information and full code:
how-to-convert-image-file-from-one-format-to-another-using-vb-net/[^]
 
Share this answer
 
v2

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