Closed carloseustaquio closed 2 years ago
Judging by the function in the underlying API bindings, this isn't a fault in my library. What happened is that imagemagick itself is throwing you the error for some reason (who knows).
Can you please run MagickWand.getException()
to find out what it is? You'll get back a nice data class with an exception type and message. You can look up the code in ExceptionType to see which one it is and how to solve it.
I'll add some documentation on the main page to make it clear how to retrieve exception details.
P.S. Your last line:
wand.annotateImage(DrawingWand(), 1.0,50.0, 1.0, "Sometext")
Shouldn't that be?
wand.annotateImage(dwand, 1.0,50.0, 1.0, "Sometext")
Any update? I'm curious how it went for you.
I'm going to close this for now since from my end it looks resolved (and no reply as of yet). Feel free to still reply to this issue with any thoughts, questions, or problems. If needed, we can re-open it.
Just want to update you. The reason it fails is because the font isn't available. (The Exception message I showed above will tell you that as well)
Hey @cherryleafroad, thank you so much for the support! I did a workaround using the native Android Canvas, and it worked well... The project where I`m using this lib is paused right now, but I'll probably be trying the solution you proposed in the future.
I've updated a lot of the examples and instructions to make it clearer how to handle and check the errors when they do occur. That should help you in the future :)
The method is throwing an error by just trying to use it..
I'm trying to use the exact same code of the example https://github.com/cherryleafroad/kmagick/blob/main/example/src/com/example/cli/Main.kt