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

Dlib.LoadImage is unable to read images from image library (even when capabity granted) #227

Open
pierresa opened this issue Mar 5, 2023 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@pierresa
Copy link

pierresa commented Mar 5, 2023

Dlib.LoadImage returns "Unable to read file". I have to copy file first to temp folder

@takuya-takeuchi takuya-takeuchi added the question Further information is requested label Mar 5, 2023
@takuya-takeuchi takuya-takeuchi self-assigned this Mar 5, 2023
@takuya-takeuchi
Copy link
Owner

takuya-takeuchi commented Mar 5, 2023

@pierresa
Could you tell me absolute path you want to have library read?
Because dlib can handle only std::string so it can not understand unicode.
You can resolve this issue by using FaceRecognition.InternalEncoding property.

@pierresa
Copy link
Author

pierresa commented Mar 5, 2023

for instance, the path string is: D:\Photos\filles.jpg

@takuya-takeuchi
Copy link
Owner

It's very weird.
Path is simple.
So this file may be corrupted or dlib may not support.

I want to reproduce your issue.
Could you upload this file?

Or you can try Image LoadImage(byte[] array, int row, int column, int stride, Mode mode) or Image LoadImage(Bitmap bitmap).

@pierresa
Copy link
Author

pierresa commented Mar 6, 2023

I do not think the issue is with the file as my work around consist of a file copy to Temp directory. As this work around works for me, we can close issue. The only thing that could help understand issue would be a more specific error message.

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

No branches or pull requests

2 participants