GithubHelp home page GithubHelp logo

Comments (7)

MolotovCherry avatar MolotovCherry commented on May 26, 2024

Also, there seemed to be missing functions of converting image to Bitmap.

Well, first of all, I'm not sure if there is or isn't a way to do that. There may be, but I haven't dealt with jmagick that much anymore. Second of all, if it is indeed missing, the reason why would be that the official jmagick library is old, out of date, and largely unmaintained. Jmagick is indeed missing a lot of features in the C code, and it is impossible to get support for them without rewriting the entire library from the ground up, which would also be like over 10,000 lines of code (too much for me to do). This is why in the FAQ I suggest to never use jmagick, as any problems you encounter, missing features, will have no support (and you're likely to encounter them). Binary usage is your best option here.

However, I'm trying to save the image in my gallery path wherein the new path is provided.

Try to check out the jmagick examples if that helps. Have you also tried to follow the general structure of the example?

Show me what code you are using, perhaps that'll give a hint

from android-imagemagick7.

mohit67890 avatar mohit67890 commented on May 26, 2024

Hey, Thanks for the reply..

Yes, the old jmagick library have support for conversion to bitmap and vice versa.
I have tried the same function with your library but it seems to be not working...

I have two main questions:

  1. Does this library works for png as well because when there is transparency, I'm facing some issues.
  2. How do I save Image to galley..

I have tried Boolean save = image.writeImage with new path of the gallery.
However, the image is not getting saved even though the return is true

Can you please help me in that..

Also, can you help me here by contacting on either:
telegram - @mohit67890
skype - live:mohit.garg67890

I am trying to build something since last three days but failing to do so..

Regards,
Mohit

from android-imagemagick7.

MolotovCherry avatar MolotovCherry commented on May 26, 2024

The reason jmagick has problems with these things is that they never updated it to support all the features and code of the newer imagemagick versions. Since they have to use the c code api, it gets very specific, and if they don't do things according to the way imagemagick works now it causes these issues.

So, assuming you are doing it right, my suggestion here is to not use jmagick at all, but use the binary. There's all kinds of issues everywhere because of code incompatibility. Even if you did somehow get it to save, you will still be encountering issues

Secondly, are you running Android >= 10? They changed how you can access external storage, so that may be another cause of your problem of not saving. If that's the cause here, you can save data to your app folder /data/data/myapp or app specific folder /storage/emulated/0/Android/data/com.myapp/files. There might exist a way to use the api to save elsewhere, but it's much harder

As jmagick has so many code incompatibilities, I'm also unable to provide support for it (especially as that wouldn't solve anything)

from android-imagemagick7.

mohit67890 avatar mohit67890 commented on May 26, 2024

Hi, I am not using jmagick at all.. Im using the same library as you have in the first section in your MainActivity.java file...
Also, in relation to Android >= 10. I already have
android:requestLegacyExternalStorage="true" in AndroidManifest.xml

I am just saying it in the pictures gallery. Also, it works fine with Open CV, I can save image through that..
There seems to be a case in this part only..

I can share you the code to you to test though..

from android-imagemagick7.

MolotovCherry avatar MolotovCherry commented on May 26, 2024

image.write(ImageInfo) this is jmagick specific code.

If you're not using jmagick, please check the commented sections in the example for binary only usage.

Here and here

Make sure to delete the uncommented jmagick section as well. There are markers showing the start and end of the section
// FOLLOWING CODE EXAMPLE BELOW IS FOR JMAGICK ONLY. IF YOU DON'T USE JMAGICK,
and
/// END JMAGICK SECTION

- After you set it up like this, please test it by saving your image in either the /data/data/com.myapp path OR the app specific path /storage/emulated/0/Android/data/com.myapp/files, just to make sure it has nothing to do with Android's new way of access. This way Android as the cause can be ruled out

from android-imagemagick7.

mohit67890 avatar mohit67890 commented on May 26, 2024

Okay, I have loaded the library correctly as was in the commented section..
The reason I skipped the Async Task was that I didn't get reference to Share Activity and you are getting info from external preferences..
Can you provide me String literals on how to run command because there is no Share Activity reference that I can find and hence it is difficult to get to know as to how to run command through that...

It would be better if you can explain the same as like that of an imagemagick command line..

from android-imagemagick7.

MolotovCherry avatar MolotovCherry commented on May 26, 2024

Solved elsewhere. Solution summary: Read the help guide on the main page

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.