C#图片周围的怪异白色轮廓 [英] Weird White Outline Around C# Images

查看:69
本文介绍了C#图片周围的怪异白色轮廓的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在C#中使用ImageList在按钮上动态显示图像.当我设置图像索引时,它将显示图像,如下所示:

I am using an ImageList in C# to display images on buttons dynamically. When I set the image index, it displays the image like so:

这是Photoshop中的同一张图片:

Here is the same image in Photoshop:

推荐答案

我在使用具有透明背景的图像时遇到了同样的问题.设置适当的颜色深度可以解决该问题.

I had same problem using image with transparent background. Setting appropriate color depth solved the issue.

imageList.ColorDepth = ColorDepth.Depth32Bit;

这篇关于C#图片周围的怪异白色轮廓的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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