开发者

Clearing ColorConvertedBitmap in C#

开发者 https://www.devze.com 2023-01-03 14:35 出处:网络
the problem is: I want to use the same ColorConvertedBitmap object for two purposes, firstly I set everyting:

the problem is: I want to use the same ColorConvertedBitmap object for two purposes, firstly I set everyting:

ColorConvertedBitmap conv = new ColorConvertedBitmap();
conv.BeginInit();
conv.SourceColorContext = new ColorContext(PixelFormats.Bgra32);
conv.Source = myImage;
conv.DestinationFormat = PixelFormats.Pbgra32;
conv.DestinationColorContext = new ColorContext(PixelFormats.Pbgra32);
conv.EndInit(); 

and then I would like to use the same object for ano开发者_开发百科ther transformation. How to reset the values of ColorConvertedBitmap?

Thank you for the reply!

Cheers


I've never used that class, but just looking at the members, it seems like setting the Source property would let you reuse it

0

精彩评论

暂无评论...
验证码 换一张
取 消