rainyl / opencv_dart

OpenCV bindings for Dart language and Flutter. Support Asynchronous Now!
https://pub.dev/packages/opencv_dart
Apache License 2.0
136 stars 18 forks source link

Change Uint8List imencode(Mat m) to (bool, Uint8List) imencode(Mat m) #166

Closed rainyl closed 4 months ago

rainyl commented 4 months ago

Also, imencodeasync returns bool,unilist Why it's not the same as imencode

Actually imencode should return (bool, Mat) too, same as opencv-python, but I forgot it when developing the sync APIs ...😭

image

So maybe we can fix it in the next release? Afterall, so many breaking changes will be included in the next release.

Or you think we should keep the current status and keep compatibility?

is there an option to take the output of tolist and just create a mat from it ? since i think this doesnt handle 2d arrays

Yes, Mat.fromList only accepts 1D List for now, I have reviewed #165, thanks for your contribution!

dont worry, i get busy and forget to reply too,

anyway i am confused what does the bool do is that success or failure? and i think matching to the python api will be much easier for developers so i think that breaking change is needed

_Originally posted by @abdelaziz-mahdy in https://github.com/rainyl/opencv_dart/issues/164#issuecomment-2242489463_