Visual Basic: Creating a .png image
I want to create a Windows application with Visual Basic. The application is pretty simple: It lets you choose 2 im开发者_开发知识库ages, and when you click "Create" the application will create a new .png image from combining the two images' bitmaps. This new file will be created on a specified directory.
How do I do that?
I would look into LaVolpe's 32bpp DIB Suite. It provides a plethora of image management routines written in VB, including saving to the PNG format.
If you want to do that you need just one picturebox , Just load an image on it using openfile file dialog and choose image , and then choose a combobox or sth like that to choose the type of the image , I hope this can help you :
Private Function GetImageFormatForSelectedCombo() As ImageFormat
Select Case ComboBox1.SelectedItem
Case "JPEG"
Return ImageFormat.Jpeg
Case "PNG"
Return ImageFormat.Png
Case "GIF"
Return ImageFormat.Gif
Case Else
Return ImageFormat.Jpeg
End Select
End Function
Oh and , if you want us to collaborate with each other to create a new program , that would be very nice ;) GOOD LUCK ;)
精彩评论