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

OSError: image file is truncated (0 bytes not processed) #185

Open
np-n opened this issue Dec 5, 2022 · 1 comment
Open

OSError: image file is truncated (0 bytes not processed) #185

np-n opened this issue Dec 5, 2022 · 1 comment

Comments

@np-n
Copy link

np-n commented Dec 5, 2022

While reading the images using the scikit-image skimage.io module i.e img = io.imread(img_file) in imgproc.py python file it throws an error : OSError: image file is truncated (0 bytes not processed) error. How to fix it?

@np-n
Copy link
Author

np-n commented Dec 11, 2022

I fixed this issue by using the OpenCV library to read the image instead of the scikit-image. Replace img = io.imread(img_file) in imgproc.py by following lines.

img = cv2.imread(img_file)
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)

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

1 participant