将字节转换为透明图像
Converting Bytes to a transparent image
我已经遇到了 MemoryStream
向 sql
插入透明图像的问题,我用 File.ReadAllBytes(filePath)
修复了它,MemoryStream
没有制作透明区域现在为了获得正确的图像我不知道我应该怎么做。我搜索了 stack overflow 和其他网站的帖子,有关于将透明图像插入 sql 的帖子,但没有注意到任何关于此的帖子
using (Image image = Image.FromStream(new MemoryStream(bitmap)))
{
image.Save(Address, ImageFormat.Jpeg);
}
有谁知道如何将字节转换为透明图像吗?
发送
您正在将图像保存为 JPEG 文件。 JPEG 图像不支持透明度。您可以使用 PNG 或 GIF 图像。他们都支持透明度。
我已经遇到了 MemoryStream
向 sql
插入透明图像的问题,我用 File.ReadAllBytes(filePath)
修复了它,MemoryStream
没有制作透明区域现在为了获得正确的图像我不知道我应该怎么做。我搜索了 stack overflow 和其他网站的帖子,有关于将透明图像插入 sql 的帖子,但没有注意到任何关于此的帖子
using (Image image = Image.FromStream(new MemoryStream(bitmap)))
{
image.Save(Address, ImageFormat.Jpeg);
}
有谁知道如何将字节转换为透明图像吗? 发送
您正在将图像保存为 JPEG 文件。 JPEG 图像不支持透明度。您可以使用 PNG 或 GIF 图像。他们都支持透明度。