ASP.NET应用程序中是否支持System.Windows.Media.Imaging类? [英] Are System.Windows.Media.Imaging Classes Supported in ASP.NET Applications?
问题描述
System.Windows.Media.Imaging中的类是否支持在ASP.NET应用程序中使用,或者这些类是否具有与System.Drawing类类似的内存/死锁/不受支持的问题?方案
Jared S. _,
谢谢您在这里发布.
对于您的问题,请添加"Presentation.dll"在您的asp.net项目中.
该dll位于c:\ Program Files \ Reference Assemblies \ Microsoft \ Framework \ v3.0 \ PresentationCore.dll中.
这是中的简单代码 MSDN 文章供您参考.
FileStream流=新的FileStream("empty.tif",FileMode.Create); TiffBitmapEncoder编码器=新的TiffBitmapEncoder(); TextBlock myTextBlock =新的TextBlock(); myTextBlock.Text =编解码器作者是:" + encoder.CodecInfo.Author.ToString(); encoder.Frames.Add(BitmapFrame.Create(image)); MessageBox.Show(myPalette.Colors.Count.ToString()); encoder.Save(stream);我希望这会有所帮助.
最好的问候,
温迪
Are the classes in System.Windows.Media.Imaging supported for use in ASP.NET applications or do these classes have similar memory/deadlock/unsupported issues as the System.Drawing classes?
Hi Jared S. _,
Thank you for posting here.
For your question, please add the "Presentation.dll" in your asp.net project.
The dll is in c:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0\PresentationCore.dll.
Here is a simple code in MSDN article for your reference.
FileStream stream = new FileStream("empty.tif", FileMode.Create); TiffBitmapEncoder encoder = new TiffBitmapEncoder(); TextBlock myTextBlock = new TextBlock(); myTextBlock.Text = "Codec Author is: " + encoder.CodecInfo.Author.ToString(); encoder.Frames.Add(BitmapFrame.Create(image)); MessageBox.Show(myPalette.Colors.Count.ToString()); encoder.Save(stream);I hope this would be helpful.
Best Regards,
Wendy
这篇关于ASP.NET应用程序中是否支持System.Windows.Media.Imaging类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!