Skip to content
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

BP - ImageCrop #1637

Open
Mitroz opened this issue Apr 13, 2023 · 1 comment
Open

BP - ImageCrop #1637

Mitroz opened this issue Apr 13, 2023 · 1 comment

Comments

@Mitroz
Copy link

Mitroz commented Apr 13, 2023

Only windows targeting is supported. I use DefaultImageFactory. Is there another implementation that is not dependent on System.Drawing ?

[15:31:54 ERR] The type initializer for 'Gdip' threw an exception.
System.TypeInitializationException: The type initializer for 'Gdip' threw an exception.
---> System.PlatformNotSupportedException: System.Drawing.Common is not supported on non-Windows platforms. See https://aka.ms/systemdrawingnonwindows for more information.
at System.Drawing.LibraryResolver.EnsureRegistered()
at System.Drawing.SafeNativeMethods.Gdip.PlatformInitialize()
at System.Drawing.SafeNativeMethods.Gdip..cctor()
--- End of inner exception stack trace ---
at System.Drawing.SafeNativeMethods.Gdip.GdipLoadImageFromDelegate_linux(StreamGetHeaderDelegate getHeader, StreamGetBytesDelegate getBytes, StreamPutBytesDelegate putBytes, StreamSeekDelegate doSeek, StreamCloseDelegate close, StreamSizeDelegate size, IntPtr& image)
at System.Drawing.Image.InitializeFromStream(Stream stream)
at System.Drawing.Image.LoadFromStream(Stream stream, Boolean keepAlive)
at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData)
at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement)
at System.Drawing.Image.FromStream(Stream stream)
at DotVVM.BusinessPack.Controls.DefaultImageFactory.Load(Stream input)

@Mitroz
Copy link
Author

Mitroz commented Apr 14, 2023

IImageFactory implementation on SkiaSharp attached if anyone needs it.
SkiaSharpImageFactory.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants