-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
.NETCore 2.2, docker 1.13.1 Gdip #203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Might be an issue with System.Drawing.Common? Similar issue reported in corefx: |
I am assuming you are using a linux container not a windows container. you might change that over to ImageSharp nuget package...its platform agnostic (linux or windows containers) or there is a package to install on linux for image apis to work.
|
@raboud this is a good idea, but how will the ImageSharp license changes impact this open source project? https://sixlabors.com/blog/beta-six-labors/#licensing-plans |
I am not a lawyer...but they state ImageSharp, ImageSharp.Drawing, and ImageSharp.Web will all be dual licensed under a AGPLv3/Commercial license. The AGPLv3 license will come with exceptions which allow bundling the code alongside all well known open source licenses (Apache 2.0, MIT etc). Any projects seen as direct competition (Imaging SDKs) will not be able to utilize that exception. Since QRCoder is licensed under MIT, I take the statement to mean you can bundle ImageSharp with it. |
This project depends on System.Drawing.Common, which I believe leverages the native libgdiplus library on Linux. ImageSharp licensing shouldn't affect QRCoder (it's not currently using it). |
@raboud I tried running this within Azure Web SSH and it seemed that the installation worked, but when I tried loading the qrcode on the website, I still get the same error. I'm using Azure Linux App Service with NETCore 3.0 . |
I am not a lawyer either, but my take of "The AGPLv3 license will come with exceptions which allow bundling the code alongside all well known open source licenses (Apache 2.0, MIT etc). Any projects seen as direct competition (Imaging SDKs) will not be able to utilize that exception."
I am interested in the outcome as I do have a use case of generating QR with .NET Core preferably running in docker... |
I compiled a copy of QRCoder.NETCore20 into a .NET CORE 3.1 application and tried with Docker on linux. Then googling for the error message I got, I discovered dotnet/dotnet-docker#618, and that did the trick - at least for what I tried. |
Since it is possible to run QRCoder even in a Linux-based Docker environment, I'll close this issue and point out the following issue, which shows up possible solutions, to problems that might occur, when running QRCoder in docker: #227 |
System.TypeInitializationException: The type initializer for 'Gdip' threw an exception. ---> System.DllNotFoundException: Unable to load shared library 'libdl' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibdl: cannot open shared object file: No such file or directory
at Interop.Libdl.dlopen(String fileName, Int32 flag)
at System.Drawing.SafeNativeMethods.Gdip.LoadNativeLibrary()
at System.Drawing.SafeNativeMethods.Gdip..cctor()
--- End of inner exception stack trace ---
at System.Drawing.SafeNativeMethods.Gdip.GdipCreateBitmapFromScan0(Int32 width, Int32 height, Int32 stride, Int32 format, HandleRef scan0, IntPtr& bitmap)
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
at QRCoder.QRCode.GetGraphic(Int32 pixelsPerModule, Color darkColor, Color lightColor, Bitmap icon, Int32 iconSizePercent, Int32 iconBorderWidth, Boolean drawQuietZones)
Your Environment
Include as many relevant details about the environment you experienced the bug in.
Version used:
NuGet package: 1.3.6
Used payload generator: PayloadGenerator.Url
Used ECC-level: default
Used renderer class: default
Environment ( .NETCore 2.2, docker 1.13.1):
The text was updated successfully, but these errors were encountered: