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

pil_cv2.check_dpi: fix class membership test #109

Merged
merged 1 commit into from
Jun 21, 2023

Conversation

bertsky
Copy link
Contributor

@bertsky bertsky commented Jun 11, 2023

(depending on how the PIL.Image was instantiated – file plugin or array interface – the previous isinstance could fail, provoking a fall-through to cv2pil which does not work)

example: PIL.JpegImagePlugin.JpegImageFile instances do not match, causing error message from cv2pil → cvtColor:

OpenCV(4.6.0) :-1: error: (-5:Bad argument) in function 'cvtColor'
> Overload resolution failed:
>  - src is not a numpy array, neither a scalar
>  - Expected Ptr<cv::UMat> for argument 'src'

(depending on how the `PIL.Image` was instantiated – file plugin or array interface – the previous `isinstance` could fail, provoking a fall-through to `cv2pil` which does not work)
@bertsky bertsky marked this pull request as ready for review June 11, 2023 22:48
@vahidrezanezhad vahidrezanezhad merged commit 5f7d9a4 into qurator-spk:main Jun 21, 2023
2 checks passed
@bertsky bertsky mentioned this pull request May 29, 2024
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

Successfully merging this pull request may close these issues.

None yet

2 participants