Visual Basic:创建 .png 图像

发布于 2024-10-10 05:50:16 字数 139 浏览 0 评论 0原文

我想使用 Visual Basic 创建一个 Windows 应用程序。 该应用程序非常简单:它允许您选择 2 个图像,当您单击“创建”时,应用程序将通过组合两个图像的位图来创建一个新的 .png 图像。这个新文件将在指定目录中创建。

我该怎么做?

I want to create a Windows application with Visual Basic.
The application is pretty simple: It lets you choose 2 images, 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

凡间太子 2024-10-17 05:50:16

我会研究 LaVolpe 的 32bpp DIB Suite。它提供了大量用 VB 编写的图像管理例程,包括保存为 PNG 格式。

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.

肤浅与狂妄 2024-10-17 05:50:16

如果你想做到这一点,你只需要一个图片框,只需使用打开文件文件对话框在其上加载图像并选择图像,然后选择组合框或类似的东西来选择图像的类型,我希望这可以帮助你:

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

哦对了,如果你希望我们互相合作
创建一个新程序,那就太好了;)祝你好运;)

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文