/// <returns>图片中非透明色部分的区域</returns>
private Region BmpRgn(Bitmap Picture, Color TransparentColor)
{
int nWidth
= Picture.Width;
int nHeight
= Picture.Height;
Region rgn = new
Region();
rgn.MakeEmpty();
bool
isTransRgn;//前一个点是否在透明区
Color curColor;//当前点的颜色
Rectangle curRect = new Rectangle();
curRect.Height = 1;
int x = 0,
y = 0;
//逐像素扫描这个图片,找出非透明色部分区域并合并起来。
for(y = 0;
y < nHeight; ++y)
{
isTransRgn = true;
for (x
= 0; x < nWidth; ++x)
{