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

[BUG] An error occurs when the file path contains Chinese characters #909

Open
ling921 opened this issue Jan 11, 2024 · 0 comments
Open
Assignees

Comments

@ling921
Copy link

ling921 commented Jan 11, 2024

Describe the bug
When using new Image<Gray, byte>(fileName), the following error will occur

[WARN:0@0.041] global loadsave.cpp:248 cv::findDecoder imread_('xxxx.png'): can't open/read file: check file path/integrity

OS / Platform
Windows 11 23H2

.Net version
.Net 8.0

CPU Architecture
x86_64

Emgu CV package used
Emgu.CV.runtime.windows-4.8.1.5350
Emgu.CV.Bitmap-4.8.1.5350

To Reproduce

using var image = new Image<Gray, byte>(fileName);

An error may occur if the file name contains Chinese characters, but this error will not occur if the following code is used

using var bitmap = new Bitmap(fileName);
using var image = bitmap.ToImage<Gray, byte>();

Expected behavior
new Image<Gray, byte>(fileName) can accept any character allowed by the operating system.

Screenshots
image

Additional context
None

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