VB.NET中的图像分层 [英] Image Layering in VB.NET
问题描述
大家好,
这是我在这个网站上的第一个问题......可能是互联网上关于VB.NET的第一个问题:D
我是新手,想学习vb.net。
我做了几个处理Photoshop的程序和各种应用程序,裁剪图像,拍摄快照等。
我现在要做的是创建一个可以操作图像的应用程序。
这是我想要做的事情:
1)我有一个像2048,2048一样巨大的画布。
2)我想有多个它上面有图像,并且有一个像photoshop这样的图层系统。
3)我可以使用多个图片盒,我遇到的问题就是让图片框透明,以显示它下面的内容。
4)例如:我有2个重叠的图片框。我想让上面的一个透明到50%的程度,看看下面的一个。
5)如何开始解决这个问题? GDI +?我需要参考什么?
谢谢和问候
-Videep
Img.MakeTransparent(color.Black)
快乐编码!
:)
< blockquote>
要使图片框中的图像透明,您应该使用ALPHA
< pre lang = vb >
如果b IsNot Nothing则
b.Filters.Alpha(CByte((20/100)* 255))
bpImage.BackgroundImage = Nothing
bpImage.BackgroundImage = b
End if
< b > < / b > < / pre >
,值略有变化
其中b指的是图片框
Hello Everyone,
This is my first question on this website...probably the first one regarding VB.NET on the internet :D
I am a newbie and want to learn vb.net.
I have made a couple of programs which handle Photoshop and various apps which crop images, take snapshots etc.
What I now want to do is create an application in which I can manipulate images.
Here is what I want to do exactly:
1) I have a canvas which is is huge like 2048,2048.
2) I would like to have multiple images on it and have a layer system like photoshop.
3) I can do it wil multiple pictureboxes, where I am getting stuck is making the picturebox transparent to show what is beneath it.
4) eg: I have 2 overlapping pictureboxes. I would like to make the upper one transparent to an extent like 50% to see the below one.
5) How to start solving this issue? GDI+? what do I need to refer to?
Thanks and Regards
-Videep
Img.MakeTransparent(color.Black)
Happy Coding!
:)
to make transparent of image in picture box you should use ALPHA <pre lang="vb"> If b IsNot Nothing Then b.Filters.Alpha(CByte((20 / 100) * 255)) bpImage.BackgroundImage = Nothing bpImage.BackgroundImage = b End If <b></b></pre> with minor changes in values where b refers to picture box
这篇关于VB.NET中的图像分层的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!