Hello
What I want to do:
I’m taking a screenshot in our application and print the image using a custom printer. Before printing I need to apply an ICC profile to the image. It is possible to do that by converting the image(Bitmap) into a BitmapSource and apply the Icc profile using .Net. The BitmapSource class is located in the PresentationCore.dll which Unity does not have. I’m trying to import the dll by putting it (and all other references) in the plugins folder but Unity fails to load the dll.
[Loading assembly failed: “Assets/Plugins/PresentationCore.dll”]
What I tried:
- Put the dll into Assets/Plugins/
- I have also try to put it in the crc.rsp but doesn’t change anything.
- Tried to create another .net dll using a reference to PresentationCore.dll but it says that it missed references even if I put everything in the assets/Plugins
- I tried to use the dll from different version of .Net (4.6, 4.7.1, 4.7.2)
I took the dll from
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.2
I was able to import System.Drawing.dll but have problems with the PresentationCore.dll.
Does anyone have an idea how to import it or other way that would allow me to use the PresentationCore.dll ?
Thank you
PS: Using Unity2019.3.4.