bytedeco / javacv

Java interface to OpenCV, FFmpeg, and more
Other
7.42k stars 1.57k forks source link

can javacv support freetype? #1281

Open FanHuaRan opened 4 years ago

FanHuaRan commented 4 years ago

can javacv support freetype?

saudet commented 4 years ago

Do you mean mapping the API of libfreetype to Java? Yes, we can do that: https://github.com/bytedeco/javacpp-presets/wiki/Create-New-Presets

FanHuaRan commented 4 years ago

Do you mean mapping the API of libfreetype to Java? Yes, we can do that: https://github.com/bytedeco/javacpp-presets/wiki/Create-New-Presets

Thanks, I will see it. can I put chinese char by it ? or there're any jar that I can direct use.

saudet commented 4 years ago

FreeType supports Unicode and other encodings, yes.

FanHuaRan commented 4 years ago

FreeType supports Unicode and other encodings, yes.

oh,I will try it. But "JavaCPP" is unfamiliar to many people(include me) and Unicode is common for OpenCV's situation. So I really wish JavaCV can direct suport FreeType.

saudet commented 4 years ago

AFAIK, OpenCV does not support Unicode very well or at all. That's not an issue with JavaCV.

FanHuaRan commented 4 years ago

okay, I know it. Thanks for you help !

saudet commented 4 years ago

Could you explain what you are trying to do? At first you said you wanted to use FreeType, but then you said you actually want to use OpenCV. Which one is it?

FanHuaRan commented 4 years ago

I'm developing a image system that support intelligent generate poster. the system user can input some char and upload backgroup image, then the system will generate some posters by template. So I'm choosing a java tool that support put char(include chinese) and small image to a big image. It's requied beautiful and high performance. I had try some tools: 1.java 2D: it‘s ugly and slowly 2.ImageMagick: it's slowly and not easy to use.

So I decide to use "JacaCV", but it's not support to put chinse char.

do you have some good ideas?

saudet commented 4 years ago

We can resize images with OpenCV, and use Java2D to draw Unicode characters. Those two libraries work just fine together, and JavaCV makes it easy to do that. That's what it's for!

FanHuaRan commented 4 years ago

did you use java2D in the actual project?I Think it is slowly and the output is not clear .

saudet commented 4 years ago

You could use JavaFX as well if you want. That's what these libraries are for.

FanHuaRan commented 4 years ago

ok, good friends! I will try it . Thank you very much ! Welcome to Chendu,China to see pandas .