如何以8,16,32位保存位图 [英] how Save a BitMap in 8,16,32 bits

查看:247
本文介绍了如何以8,16,32位保存位图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我的项目有问题
在这个时刻,即时通讯试图用这种语法保存位图
该应用程序在VB.NET(VS 2010)中

hi guys,
i have a problem with my project
in this momment im trying to save a bitmap with this syntax
the app is in VB.NET (VS 2010)

Private Function getImage(rect As Rectangle, penWidth As Integer)
Dim bitmap As New Bitmap(rect.Width, rect.Height)
Dim brush As New SolidBrush(Color.White)
Dim graphics As Graphics
graphics = graphics.FromImage(bitmap)
graphics.FillRectangle(brush, 0, 0, rect.Width, rect.Height)



然后我保存位图:



Then i save the bitmap:

bitmap.Save(saveLocation, Imaging.ImageFormat.bmp)



然后在VB 6.0中开发的其他应用程序中

我试图使用保存的图像生成报告.

我在VB 6.0应用程序中使用此语法



then in other Application developed in VB 6.0

i trying to generate a Report with the image Saved.

i use this syntax in the VB 6.0 App

Printer.paintPicture LoadPicture(Savedlocation,....)



然后在上面显示的行中出现错误时:
无效的惩罚"
我想 .是位图的问题...我认为

谢谢您的帮助
来自墨西哥的问候



then is in the line shown above when the Error:
"Invalid Pucture"
i think . is a problem with the Bits of Bitmap... i think

thanks por the help
regards from Mexico

推荐答案

Paint是否打开图像?它名为.bmp吗?为什么要完全使用VB6?在位图构造函数中,可以为图像指定位深度.
Does Paint open the image ? Is it named .bmp ? Why would you use VB6 at all ? The Bitmap constructor is where you specify a bit depth for your image.


这篇关于如何以8,16,32位保存位图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆