[英]how to create 1px X 1px on .Net
我需要一个图像1px X 1px或使用c#清空Jpeg图像
我现在无法测试,但不应该这样做吗?
(new Bitmap(1,1)).Save(name,ImageFormat.Jpeg);
You can do something like this .. 你可以这样做..
var image = new Bitmap(1, 1);
MemoryStream stream = new MemoryStream();
image.Save(stream, ImageFormat.Jpeg);
stream.Position = 0;
And then save the stream to a file. 然后将流保存到文件中。
Hope this helps. 希望这可以帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.