-
Notifications
You must be signed in to change notification settings - Fork 53
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
Still no Implementation #9
Comments
Did you follow the Quick Setup Instructions on the main page, including the section on How to Run the Binary, and the FAQ of Frequently most encountered problems and how to solve them (which includes how to solve the Unsatisfied Link Error)? There's even a link to an example app with the full app folder structure and example code. By the way, I really don't recommend to use that version. 1) It's old, 2) you probably don't need nor want jmagick, 3) invoking the binary with the commands you want should more than suffice for everything you need, 4) it's harder to to use jmagick rather than just invoking a binary with commands Also, setting up the NDK to build it yourself is incredibly easy. It's as easy as downloading and installing it from the SDK manager, then you can look at my example app for a build config and app structure. I even included a bat file to start the build process.
You need to look at and change the code. It's example code meant to be changed and configured according to your needs. It's not build ready. You need to look at the main instructions on the main page and add your ENV variables (btw, all that is done in the code already, so you just need to uncomment/change it and make sure you're using a binary only build -> I realize I'm referencing the binary version, that's because this is the version you should be using). (Again, you really don't want to use the jmagick version there. It'll make things harder for you when programming. Use the binary code section in the And if you want to use the latest code, you'll have to build it yourself, but like I said before, there's some Quick Start Instructions on the main page for that, and it's as easy as copying my app folder, looking at and changing the code, installing NDK from the SDK manager, and putting the project in the JNI folder and starting the build. I'd also need to see your entire project to tell you what's wrong, because there's too many points of failure. Lastly -> There are some old binary builds in the release section, you can use it for initial testing to see if you got it right (use the static build if you want it to be the easiest for you). But ultimately, I suggest you use the most up-to-date sources. And again, literally anything you want to do can be done in a binary build, plus you get official documentation from the Imagemagick website for it (good luck finding documentation for jmagick) |
Dear Cherry ,
at first - THANK you very much for your (long) answer and your time you spent for it. i think also, that i do not understand correctly , whats the different between the versions and Again thank you very much for your time. |
. |
As usual, new versions offer bug fixes and newer features. |
So some things I noticed with your project.
Uncomment section:
Delete section:
Uncomment section
... And so on
P.P.S. If you look closely at the example app, there's a binary and lib already in the folders. You could just copy that example app verbatim, uncomment the binary java code (and delete the jmagick section), and it'd probably work out of the box |
Thank you - very much :-) I started to get into it - this will take the night and i will give you the feedback |
This error means that Java is looking for the native function in JNI, but it can't find it. Notice the path My C functions are named So, if you fix your package locations (and the package statements and import statements), it'll fix that error |
Oh, my, god !!!! @cherryleafroad Thank you very very much for your help. |
You should know that the jmagick version is probably unreliable too, I wouldn't trust it much to do what it should. jmagick was already pretty much defunct before I even included it here. The only way to get a good jmagick version would be to do a complete rewrite from the ground up, but unfortunately after writing thousands of lines of C code, it was too much work for 1 person *facepalm |
yes you wrote this sometimes above .... and i'm a pure "c" developer - the work ist too much ...... in my case, i only need a bevel function like "EmbossMaskFilter" from the original Google API. Therefore i tried OpenCV and ImageMagick . |
I mean the binary version. It's much easier to do something like what you what from the commandline ;) You don't have to give up this imagemagick to go for the binary version. If the jmagick API was stable though I'd have no issue saying it may be better (although maybe a bit of work figuring out the programming commands, but nonetheless better). Little tiny bugs or problems may creep up on you without you knowing. For example, I made something using it, and it wouldn't get transparency right even though it works in the commandline. C coding wasn't right.
At the time of project creation, there was a surprisingly lack of any good image editing tools for Android (or they were horribly outdated). That's why I made this one. As you say, it's the only "usable" one. |
i also found something in this direction https://github.com/thenewcircle/renderscriptimaging Its working (and fast) , but you have to step deeply in impageprocessing from scratch , to implement |
Beside Note : Playing with your implementation , i found out that an Android - bitmap operation is missing. |
Yet another thing missing from the official project. Another example why I don't trust jmagick all that much, as its API is incomplete and lacking (also bug prone). If you feel like getting the src compiling though, adding that file to the build wouldn't be that hard for you. Just update the build file to include the src, then throw in the magick java src. (and remove the loadlibrary, we already do that). |
Thx a lot :-) in the moment i'm trying to figure out , how to setup the system correctly to use NDK . Do you have time to recomplie the binaries and place them here as ZIP ? |
I don't - I haven't done this project in a long time and don't have things set up anymore. But if you encounter errors and need additional help, feel free to let me know and I'll help you out. I'm closing this issue as the original problem is solved. |
Using the new NDK 22.070, you have to change several things a) /MagicCore/memory.c -> function AcquireAlignedMemory_STDC (Line 252)
b)
Full Example |
Hi,
at first - Thx a lot for your work ...
I do not have experience with NDK and i need the Lib only for one operation in my app ( bevel)
But im Sorry , maybe i'm stupid - i followed all instructions with the finished zip from here
#4 (comment)
i still get no Unsatisfied Link error. Can you pls help me ??
What i have done
a) create a blank project ( androidx , AS 4.1.1)
b) copied the whole Source, created a (blank) Jni folder,
c) created a libs/arm64-v8a and copied all files from zip above into it
d) compile project ( with NO changes of init part in your Mainactivity )
f) added Write permission
When i start the project , the lib will loaded ( System.loadLibrary("jmagick-7");
But the next point fails
java.lang.UnsatisfiedLinkError: No implementation found for void com.wdtec.testapp.magick.Magick.setAppConfigDataDir(java.lang.String) (tried Java_com_wdtec_testapp_magick_Magick_setAppConfigDataDir and Java_com_wdtec_testapp_magick_Magick_setAppConfigDataDir__Ljava_lang_String_2)
Any cool tip as christmas gift for me ? :-)
Thank u very much
The text was updated successfully, but these errors were encountered: