Coder Social home page Coder Social logo

Comments (6)

m1ga avatar m1ga commented on June 2, 2024

I can check it but do you use a different version/fork of the module?
ImageFactoryModule.java:316 doesn't exist:
https://github.com/tidev/ti.imagefactory/blob/stable/android/src/ti/imagefactory/ImageFactoryModule.java

from ti.imagefactory.

m1ga avatar m1ga commented on June 2, 2024

As an alternative:

av.imageview with resize:

m1ga/av.imageview@659890c

av.imageview-android-5.1.0.zip

AvImageview.resizeImage({
	blob: sourceBlob,
	width: 400,
	height: 300
})

AvImageview.addEventListener("complete", function(data) {
	console.log(data.blob.width, data.blob.height)
});

and then you can put that resized blob into the compression

from ti.imagefactory.

hansemannn avatar hansemannn commented on June 2, 2024

We use 4.1.1 right now, but I assume the compression didn't change there, yet. We would really prefer a stable API in this module if possible - the Compressor lib really looks promising. What do you think? Maybe I can also do the change

from ti.imagefactory.

m1ga avatar m1ga commented on June 2, 2024

No that didn't change, was just wondering if you have a different fork that might do some other work before. I did a test with a backgroundThread already and it works but I just can't get the image back into the app 😄

Compressor looks good to but I think it will have the same issue if you don't put it in a different thread (it has an example at the bottom).
I just wonder what the issue is:
are you compressing a big image to a lower compress jpg? Then even with the other library you could run into memory issues.
Or did you compress and resize an image? Then I saw other posts of using Glide, Picasso or so to load the image as they do it better and resize them and then compress it.

So different ways to go here but a Compressor module would be nice too. It has some open issue (e.g. memory issues zetbaitsu/Compressor#190) and some open PRs like More precise image resolution so perhaps other libraries are more up to date. But shouldn't be that difficult to create it anyways

from ti.imagefactory.

hansemannn avatar hansemannn commented on June 2, 2024

It's used to compress an image prior to uploading it.

from ti.imagefactory.

m1ga avatar m1ga commented on June 2, 2024

the compressAsync() method #336

from ti.imagefactory.

Related Issues (17)

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.