-
Notifications
You must be signed in to change notification settings - Fork 5.8k
freetype: support 8UC1/8UC4 image #3288
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution!
*/ | ||
|
||
CV_WRAP virtual void loadFontData(String fontFileName, int id) = 0; | ||
CV_WRAP virtual void loadFontData(String fontFileName, long idx) = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
long
This type is not well supported by OpenCV bindings (Python/Java/etc)
int32_t
has the same problem. It is better to keep int
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because it has side effects, I agree to revert to the unfixed code.
Thank you for your comment !
modules/freetype/test/test_basic.cpp
Outdated
putText(dst, "LINE_8 putText(th=2)" , Point( 240,565),FONT_HERSHEY_SIMPLEX, 0.5, col, 2, LINE_8); | ||
putText(dst, "LINE_AA putText(th=2)", Point( 240,580),FONT_HERSHEY_SIMPLEX, 0.5, col, 2, LINE_AA); | ||
|
||
#ifdef OUTPUT_FILE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could use if (cvtest::debugLevel > 0)
instead.
Details: opencv/opencv#18955
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is very useful for me !I
I pushed a commit to use it, thank you very much!
- Revert 3rd argument type of loadFontData() to use "int". - Use cvtest::debugLevel instead to OUTPUT_FILE define. - Change type of idx_range list and ctol_range list to use "int". - fix typo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done! Thank you 👍
Thank you very much!! |
freetype: support 8UC1/8UC4 image * freetype: add parameter test * freetype: support CV_8UC3 and CV_8C4 * freetype:fix for gcc5.4 * freetype: delete newline * freetype:fix for python binding * freetype: Revert 3rd argument type of loadFontData() to use int. - Revert 3rd argument type of loadFontData() to use "int". - Use cvtest::debugLevel instead to OUTPUT_FILE define. - Change type of idx_range list and ctol_range list to use "int". - fix typo.
Fix #2009 (Request for 8UC4)
Fix #3276 (Request for 8UC1)
Related opencv/opencv_extra#981
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.