GithubHelp home page GithubHelp logo

Comments (14)

yusrilmr avatar yusrilmr commented on May 26, 2024 2

Hi,

Currently, I am looking for a library to manipulate images (draw and add text) and based on the website, it seems ImageMagick will cover all features that I need.
However, I am not familiar with ImageMagick and I am not an expert in Android development.

To the best of my knowledge, to include an external library into your project, you have to find the ".jar" file first. I have tried to find it within your repository, but I could not find any.

I believe it's more because of my limited knowledge. Therefore, Would you like to give me a clue on how to properly include ImageMagick library to an Android Project?

Thank you in advance.

from android-imagemagick7.

MolotovCherry avatar MolotovCherry commented on May 26, 2024

About 60% through rewriting the whole API, but it's too much work right now. I don't have time to complete it.

from android-imagemagick7.

f1vefour avatar f1vefour commented on May 26, 2024

You have done an excellent job here. What was your goal for this project? A full featured Android application or just a image manipulation library?

from android-imagemagick7.

MolotovCherry avatar MolotovCherry commented on May 26, 2024

Just a usable image manipulation library (can be used from Java as well) which can be used in anybody's applications (it currently can be, but like I said, the API isn't up to par)

from android-imagemagick7.

MolotovCherry avatar MolotovCherry commented on May 26, 2024

@yusrilmr You can use the example source code in libjmagick-7/android. Everything you need, including the jmagick java library, coding examples, and assets, can all be found in there.

Just remember that you should build the executable yourself. You can install NDK for that. It's not terribly difficult since you can just run the build script (bat or sh) after you set the correct env variables (no need to have Android Studio build it).

If you want to make everything easier for yourself, just run it as an executable binary from Android. Then you can work on refining your command-line parameters for doing the actual image editing work without needing to mess with a Java API

from android-imagemagick7.

MolotovCherry avatar MolotovCherry commented on May 26, 2024

I don't have time to do an entire API conversion to Java, so I'll have to close this one. Probably would end up at more than 10,000 lines of code, and notwithstanding extensive testing being needed

from android-imagemagick7.

MolotovCherry avatar MolotovCherry commented on May 26, 2024

This is done now with KMagick. #45 P.S. Thanks to Rust I was able to reduce codesize, but it took about 20,284 lines still

from android-imagemagick7.

KishorJena avatar KishorJena commented on May 26, 2024

I have been trying hard to implement jmagick-6.3.9 but could not. Then came to know that you have this here. I want to use ImageMagick in react native for resiing and converting the animated webp files only I am very noob in android studio. I could not implement this library into a React Native node_module although I was able to implement some other libraries using maven.
I tried puting .so files and set up build.gradle like given in example. Could not implement. I am sitting hopeless as I can't learn all those things right and. My app stuck at the end as I am not able to manipulate animated webp files.

from android-imagemagick7.

MolotovCherry avatar MolotovCherry commented on May 26, 2024

I have been trying hard to implement jmagick-6.3.9 but could not. Then came to know that you have this here. I want to use ImageMagick in react native for resiing and converting the animated webp files only I am very noob in android studio. I could not implement this library into a React Native node_module although I was able to implement some other libraries using maven.
I tried puting .so files and set up build.gradle like given in example. Could not implement. I am sitting hopeless as I can't learn all those things right and. My app stuck at the end as I am not able to manipulate animated webp files.

Jmagick is old and incompatible with the new imagemagick 7. It needs a complete rewrite to work. While I did make it "work" by patching it, it was buggy and inconsistent at best, and at worst didn't even do what you wanted it to do. So I do not suggest even bothering trying with it. Their code hasn't been updated in years, and hasn't received much attention for IM7, and you're unlikely to be able to get it to compile at all

Regarding the imagemagick .so. it is only imagemagick and nothing more. It has no bindings in it to java.

Why don't you check out kmagick which was made using (the much better) kotlin?
https://github.com/cherryleafroad/kmagick

I have already implemented this resizing function you're looking for here and here

This kmagick library was compiled directly against the imagemagick library here for Android. So it will 100% work out of the box once you have it set up right

from android-imagemagick7.

KishorJena avatar KishorJena commented on May 26, 2024

I can resize the animated webp files on ImageMagick 7 windwos cli. So can I do that with kmagick? If so then I will try to create a React Native module using kmagick.
Currently only static image resizing is avaialble for React Native and also there is a RN module of ffmpeg but cannot resize or convert animated webp as no webp decoder avaialble there. After resolving my problem I will make the RN module public so that other wont have to suffer like me.

from android-imagemagick7.

MolotovCherry avatar MolotovCherry commented on May 26, 2024

I can resize the animated webp files on ImageMagick 7 windwos cli. So can I do that with kmagick? If so then I will try to create a React Native module using kmagick.
Currently only static image resizing is avaialble for React Native and also there is a RN module of ffmpeg but cannot resize or convert animated webp as no webp decoder avaialble there. After resolving my problem I will make the RN module public so that other wont have to suffer like me.

Check the main page for the information you need. WebP delegate is enabled. If kmagick doesn't serve your needs, you can try using the binary directly. Both the library and binary are present for this reason

from android-imagemagick7.

KishorJena avatar KishorJena commented on May 26, 2024

I can resize the animated webp files on ImageMagick 7 windwos cli. So can I do that with kmagick? If so then I will try to create a React Native module using kmagick.
Currently only static image resizing is avaialble for React Native and also there is a RN module of ffmpeg but cannot resize or convert animated webp as no webp decoder avaialble there. After resolving my problem I will make the RN module public so that other wont have to suffer like me.

Check the main page for the information you need. WebP delegate is enabled. If kmagick doesn't serve your needs, you can try using the binary directly. Both the library and binary are present for this reason

I tried to setup kotline and I can import the com.cherryleafroad.kmagick.* . but when I use Magick.initialize() the app crash on invoking. It seems that I could not place the jars and so files properly or missed some configs like Loading library in constructor or somthing else.

It would be easy if kotline sample project were there like where to put so and jars and what to write in build.gradle and if there is more neccesary config required before using Magick . :(

from android-imagemagick7.

MolotovCherry avatar MolotovCherry commented on May 26, 2024

I can resize the animated webp files on ImageMagick 7 windwos cli. So can I do that with kmagick? If so then I will try to create a React Native module using kmagick.
Currently only static image resizing is avaialble for React Native and also there is a RN module of ffmpeg but cannot resize or convert animated webp as no webp decoder avaialble there. After resolving my problem I will make the RN module public so that other wont have to suffer like me.

Check the main page for the information you need. WebP delegate is enabled. If kmagick doesn't serve your needs, you can try using the binary directly. Both the library and binary are present for this reason

I tried to setup kotline and I can import the com.cherryleafroad.kmagick.* . but when I use Magick.initialize() the app crash on invoking. It seems that I could not place the jars and so files properly or missed some configs like Loading library in constructor or somthing else.

It would be easy if kotline sample project were there like where to put so and jars and what to write in build.gradle and if there is more neccesary config required before using Magick . :(

The config is the same as the example project. When you make a kotlin Android app, you can check out the example project for where the libs folder is, and the build Gradle. The rest you may have to Google.

But I can't really provide a tutorial on how to use Android studio.

What are your exact errors from the log tab in Android studio?

For general Android Studio help and usage for basic things like where to put libs and such, I suggest the Android discord

from android-imagemagick7.

KishorJena avatar KishorJena commented on May 26, 2024

I can resize the animated webp files on ImageMagick 7 windwos cli. So can I do that with kmagick? If so then I will try to create a React Native module using kmagick.
Currently only static image resizing is avaialble for React Native and also there is a RN module of ffmpeg but cannot resize or convert animated webp as no webp decoder avaialble there. After resolving my problem I will make the RN module public so that other wont have to suffer like me.

Check the main page for the information you need. WebP delegate is enabled. If kmagick doesn't serve your needs, you can try using the binary directly. Both the library and binary are present for this reason

Well I am not using Android Studio but the CLI and trying to implement directly in React Native. Now I will try kmagick on Android Studio and fix there first then will bring it to react native. :) btw Thanks for guiding.

from android-imagemagick7.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.