Home General VB.NET Change Image File Format .NET
20 | 05 | 2012
This site has been updated and renewed. You have followed an old link.

Click here to go to the new site

http://www.visiblevisual.com/jupgrade

Change Image File Format .NET PDF Print E-mail
User Rating: / 2
PoorBest 
Tutorials
Using VB.NEt you can change a images file format. Use the code below:
[code]
    Sub ConvertImageFormat(ByVal Picturepath As StringByVal Picturename As String)
 
        Dim Image As Drawing.Image
 
        Image = Image.FromFile(Picturename) 'opens file in any format
 
        'save file
        image.Save(Picturepath, Drawing.Imaging.ImageFormat.Bmp) 'save to bmp format
        image.Save(Picturepath, Drawing.Imaging.ImageFormat.Jpeg) 'save to jpeg format
 
    End Sub

 

Sub TestImageConvertion()
 
        'below a string on how to test the convertion
        'change the picture path or imageformat to test more file formats
 
        ConvertImageFormat("C:\My Images\", "Testimage.Jpeg")
 
End Sub
[/code]
 

Add comment


Security code
Refresh

This site has been updated and renewed. You have followed an old link.

Click here to go to the new site

http://www.visiblevisual.com/jupgrade