透明度,ASP.NET和GDI + [英] Transparency, ASP.NET, and GDI+

查看:55
本文介绍了透明度,ASP.NET和GDI +的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用包含透明度的GDI +创建图形。但是,

即使我的颜色的alpha值为0,我也不会出现透明度。如何在
某些区域(以便网页背景显示)?我将我的

图形保存为gif文件。如果可能的话,我将很感激一个简单的例子,所以我可以看到代码。谢谢。

-

Nathan Sokalski
nj * *******@hotmail.com
http:// www.nathansokalski.com/

I am trying to create graphics with GDI+ that include transparency. However,
the transparency never seems to show up, even though my colors have an alpha
value of 0. How can I generate a graphic that is completely transparent in
certain areas (so that the web page background shows through)? I save my
graphics as gif files. I would appreciate, if possible, a simple example so
that I can see the code. Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

推荐答案

HTML中唯一具有透明度的图形格式是GIF和PNG。

你用的是什么格式?


-

HTH,


Kevin Spencer
Microsoft MVP

..Net开发人员

每个人都会嗤之以鼻,

但有些人躲藏起来更好。


" Nathan Sokalski" < NJ ******** @ hotmail.com>在消息中写道

新闻:Ot ************** @ TK2MSFTNGP10.phx.gbl ...
The only graphics formats that have transparency in HTML are GIF and PNG.
What format are you using?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Everybody picks their nose,
But some people are better at hiding it.

"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:Ot**************@TK2MSFTNGP10.phx.gbl...
我正在尝试创建GDI +的图形包括透明度。
然而,透明度似乎永远不会出现,即使我的颜色
的alpha值为0.我怎样才能生成完全透明的图形在某些地区(以便网页背景显示
通过)?我将我的图形保存为gif文件。如果可能的话,我将非常感谢
一个简单的例子,以便我可以看到代码。谢谢。
-
Nathan Sokalski
nj ******** @ hotmail.com
http://www.nathansokalski.com/
I am trying to create graphics with GDI+ that include transparency.
However, the transparency never seems to show up, even though my colors
have an alpha value of 0. How can I generate a graphic that is completely
transparent in certain areas (so that the web page background shows
through)? I save my graphics as gif files. I would appreciate, if possible,
a simple example so that I can see the code. Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/



就像我在原始邮件中说的那样,我正在使用GIF。我用来保存我的图像的行如下(testbitmap是我的

System.Drawing.Bitmap对象的名称):

testbitmap.Save(Server.MapPath(" GDItest.gif"),Imaging.ImageFormat.Gif)


-

Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/


凯文斯宾塞 <柯*** @ DIESPAMMERSDIEtakempis.com>在消息中写道

新闻:eq ************** @ TK2MSFTNGP10.phx.gbl ...
Like I said in my original message, I am using GIF. The line that I use to
save my image is as follows (testbitmap is the name of my
System.Drawing.Bitmap object):

testbitmap.Save(Server.MapPath("GDItest.gif"), Imaging.ImageFormat.Gif)

--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:eq**************@TK2MSFTNGP10.phx.gbl...
唯一的图形格式HTML中的透明度是GIF和PNG。
你使用什么格式?

HTH,

Kevin Spencer
微软MVP
.Net开发人员
每个人都嗤之以鼻,
但是有些人擅长隐藏它。

Nathan Sokalski < NJ ******** @ hotmail.com>在消息中写道
新闻:Ot ************** @ TK2MSFTNGP10.phx.gbl ...
The only graphics formats that have transparency in HTML are GIF and PNG.
What format are you using?

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
Everybody picks their nose,
But some people are better at hiding it.

"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:Ot**************@TK2MSFTNGP10.phx.gbl...
我正在尝试使用GDI +创建图形包括透明度。
然而,透明度似乎永远不会出现,即使我的颜色
的alpha值为0.我如何生成在某些区域完全透明的图形(这样网页背景显示
通过?我将我的图形保存为gif文件。如果可能,我会很感激,这是一个简单的例子,以便我可以看到代码。谢谢。
-
Nathan Sokalski
nj ******** @ hotmail.com
http://www.nathansokalski.com/
I am trying to create graphics with GDI+ that include transparency.
However, the transparency never seems to show up, even though my colors
have an alpha value of 0. How can I generate a graphic that is completely
transparent in certain areas (so that the web page background shows
through)? I save my graphics as gif files. I would appreciate, if
possible, a simple example so that I can see the code. Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/




我认为IE不支持透明度。

至少我可以肯定地说它不支持PNG透明度。

这是一个应该用IE 7解决的问题,或者可以用Firefox解决的问题!


Nathan Sokalski < NJ ******** @ hotmail.com>在留言中写道

新闻:关于************** @ TK2MSFTNGP14.phx.gbl ...
I think IE don''t support transparency.
At least I can say for sure it doesn''t support PNG transparency.
It is an issue that should be fixed with IE 7 or could be fixd with Firefox!

"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:On**************@TK2MSFTNGP14.phx.gbl...
就像我在我说的那样原始消息,我正在使用GIF。我用来保存图像的行如下(testbitmap是我的
System.Drawing.Bitmap对象的名称):

testbitmap.Save(Server.MapPath) (GDItest.gif),Imaging.ImageFormat.Gif)

-
Nathan Sokalski
nj ******** @ hotmail.com
http://www.nathansokalski.com/

凯文斯宾塞 <柯*** @ DIESPAMMERSDIEtakempis.com>在消息中写道
新闻:eq ************** @ TK2MSFTNGP10.phx.gbl ...
Like I said in my original message, I am using GIF. The line that I use to
save my image is as follows (testbitmap is the name of my
System.Drawing.Bitmap object):

testbitmap.Save(Server.MapPath("GDItest.gif"), Imaging.ImageFormat.Gif)

--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:eq**************@TK2MSFTNGP10.phx.gbl...
唯一具有HTML透明度的图形格式是GIF和PNG。
你使用的是什么格式?

- HTH,

Kevin Spencer
Microsoft MVP .Net开发人员
每个人都会嗤之以鼻,但是有些人更善于隐藏它。

Nathan Sokalski < NJ ******** @ hotmail.com>在消息中写道
新闻:Ot ************** @ TK2MSFTNGP10.phx.gbl ...
The only graphics formats that have transparency in HTML are GIF and PNG.
What format are you using?

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
Everybody picks their nose,
But some people are better at hiding it.

"Nathan Sokalski" <nj********@hotmail.com> wrote in message
news:Ot**************@TK2MSFTNGP10.phx.gbl...
我正在尝试使用GDI +创建图形包括透明度。
然而,透明度似乎永远不会出现,即使我的颜色
的alpha值为0.我如何生成在某些区域完全透明的图形(这样网页背景显示
通过?我将我的图形保存为gif文件。如果可能,我会很感激,这是一个简单的例子,以便我可以看到代码。谢谢。
-
Nathan Sokalski
nj ******** @ hotmail.com
http://www.nathansokalski.com/
I am trying to create graphics with GDI+ that include transparency.
However, the transparency never seems to show up, even though my colors
have an alpha value of 0. How can I generate a graphic that is completely
transparent in certain areas (so that the web page background shows
through)? I save my graphics as gif files. I would appreciate, if
possible, a simple example so that I can see the code. Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/





这篇关于透明度,ASP.NET和GDI +的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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