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

libheif not found WSA/Android ImageSharp #3

Open
prabhav-mehra opened this issue Sep 7, 2023 · 6 comments
Open

libheif not found WSA/Android ImageSharp #3

prabhav-mehra opened this issue Sep 7, 2023 · 6 comments

Comments

@prabhav-mehra
Copy link

prabhav-mehra commented Sep 7, 2023

Thanks for this library, very helpful for what I am working on.

I am trying to load an HEIC image using ImageSharp using this library. It works on windows but when I try to load it on android (I am using WSA, haven't gotten a chance to test on actual device but I would imagine it being the same), I get libheif not found.

I have installed both 'LibHeif.Native.win-x64' and 'LibHeif.Native.linux-x64'. for some reason 'LibHeif.Native' give me errors so I had install both separately.

System.DllNotFoundException: 'libheif'

[HeifDecoderImpl] getSize: not supported!
[HeifDecoderImpl] getSize: not supported!
Loaded assembly: LibHeifSharp.dll [External]
[monodroid-assembly] Shared library 'libheif' not loaded, p/invoke 'heif_get_version_number' may fail
[monodroid-assembly] Shared library 'libheif' not loaded, p/invoke 'heif_get_version_number' may fail
[HeifDecoderImpl] getSize: not supported!
[HeifDecoderImpl] getSize: not supported!
[HeifDecoderImpl] getSize: not supported!
**System.DllNotFoundException:** 'libheif'```
@prabhav-mehra prabhav-mehra changed the title libheif not found WSA ImageSharp libheif not found WSA/Android ImageSharp Sep 7, 2023
@prabhav-mehra
Copy link
Author

I know heic is an ios specific image type but I wanted to cover all user scenarios (i.e. if a user has saved an heic image in file system and wants to load that)

@hey-red
Copy link
Owner

hey-red commented Sep 7, 2023

For runtimes other than linux x64/windows x64 you will need to get build of libheif for ARM runtime.
I think this is only way to get work libheif-sharp on android devices.

@prabhav-mehra
Copy link
Author

prabhav-mehra commented Sep 12, 2023

For runtimes other than linux x64/windows x64 you will need to get build of libheif for ARM runtime.

I think this is only way to get work libheif-sharp on android devices.

Are there any steps on how to incorporate the ARM build for this to work? Also little confused about the get work libheif-sharp on android devices, does this mean this library can't work android?

@prabhav-mehra
Copy link
Author

@hey-red when I get access to .so files 0xC0000054/libheif-sharp#9 (comment) required for android. do I have to add similar code as linux/win build src files

@prabhav-mehra
Copy link
Author

@hey-red I get “dll not found” on an iOS device as well. Is that expected? I would think it would be supported on iOS as that it the most common os which supports heif images

@prabhav-mehra
Copy link
Author

prabhav-mehra commented Sep 18, 2023

@hey-red would it be possible if you could add support for android and ios in the library itself? I tried few things but I never got this working.

Since you have already the system/steps sorted with the builds for linux and windows, it would be very helpful to get it working on android and ios as well.

libheif-sharp supports android and ios but needs to be built with android and ios dlls for it to work.

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

No branches or pull requests

2 participants