How to use BitmapSource from System.Windows.Media.Imaging ?
I want to use BitmapSource from System.Windows.Media.Imaging (Documentation here: http://msdn.microsoft.com/de-de/library/system.windows.media.imaging.bitmaps...) It would be great if someone could help me with this, as I do not have yet much experience with python for .NET, and none at all with .NET itself. My test script: import clr clr.AddReference("System.Windows") import System.Windows bitmap = System.Windows.Media.Imaging.BitmapSource() The interpreter info is: Traceback (most recent call last): File "C:\Users\mdk\workspace\testbitmap.py", line 4, in <module> bitmapsrc = System.Windows.Media.Imaging.BitmapSource() AttributeError: Media I tried also: import clr clr.AddReference("System.Windows.Media") import System.Windows bitmapsrc = System.Windows.Media.Imaging.BitmapSource() Traceback (most recent call last): File "C:\Users\mdk\workspace\testbitmap.py", line 2, in <module> clr.AddReference("System.Windows.Media") System.IO.FileNotFoundException: Unable to find assembly 'System.Windows.Media'. bei Python.Runtime.CLRModule.AddReference(String name) And I also tried: import clr clr.AddReference("System.Windows") from System.Windows import Media bitmapsrc = Media.Imaging.BitmapSource() Traceback (most recent call last): File "C:\Users\mdk\workspace\lr_control\src\lr_control\camera\testbitmap.py", line 3, in <module> from System.Windows import Media ImportError: cannot import name Media
participants (1)
-
Daniel Krause