开发者

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 ;)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜