社区
C#
帖子详情
Graphics.FromImage()与Bitmap的问题
luoshik
2010-12-25 11:20:04
比如定义了
private Bitmap bits;
private Graphics bitG;
...
bitG=Graphics.FromImage(bits);
之后,为什么
bitG.DrawLine(...)会把线画在位图对象bits上?
...全文
91
3
打赏
收藏
Graphics.FromImage()与Bitmap的问题
比如定义了 private Bitmap bits; private Graphics bitG; ... bitG=Graphics.FromImage(bits); 之后,为什么 bitG.DrawLine(...)会把线画在位图对象bits上?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
3 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
wuyq11
2010-12-25
打赏
举报
回复
Graphics.FromImage
从指定的 Image 创建新的 Graphics。
操作肯定在图像上。
luoshik
2010-12-25
打赏
举报
回复
不懂。。。能详细讲讲吗?
wangsong145
2010-12-25
打赏
举报
回复
因为你创建的绘制对象是bits的绘制对象啊
DotNetBarcode.dll 生成二维码,亲手试过支持中文
网上有好多都说支持中文,实际都不行...
Graphics
g =
Graphics
.From
Image
(img); dnb.WriteBar(code, 0, 0, 120, 120, g); Response.ContentType = "
image
/gif"; img.Save(Response.OutputStream,
Image
Format.Gif);
C#中
Graphics
.From
Image
()方法的实现效果
C#中
Graphics
.From
Image
()方法的实现效果
Graphics
.From
Image
Graphics
.From
Image
Bitmap
im = new
Bitmap
(300, 300);
Graphics
g =
Graphics
.From
Image
(im); Draw
Image
(im, 0, 0);
Graphics
.From
Image
在图im上创建...
Graphics
.From
Image
报错“
Graphics
object cannot be created from an
image
that has an indexed pixel ...”
C#调用
Graphics
.From
Image
时报错“A
Graphics
object cannot be created from an
image
that has an indexed pixel format. (Parameter '
image
')”
C# 关于画图
Graphics
Bitmap
image
System.Drawing.
Image
;System.Drawing.Drawing2D;
Graphics
类封装了一个GDI+绘图图面,提供将对象绘制到显示到设备的方法。
Graphics
叫画板,只不过这个画板中带了很多工具。但画图时你要定义画板的大小,颜色等
Graphics
详解
创建要绘制的图形对象,需要先创建
Graphics
对象,然后才可以使用GDI+绘制线条和形状、呈现文本或显示与操作图像。 处理图形包括两个步骤:创建
Graphics
对象和使用
Graphics
对象绘制线条和形状、呈现文本或显示与操作...
C#
110,535
社区成员
642,575
社区内容
发帖
与我相关
我的任务
C#
.NET技术 C#
复制链接
扫一扫
分享
社区描述
.NET技术 C#
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧
+ 用AI写文章