-
Notifications
You must be signed in to change notification settings - Fork 90
Resizing an image with options.storeImage = true is not working #13
Comments
Hi Doron, I am currently not maintaining the code. I will find the time in the near future to update everything and make sure this plugin can be used with the newest phonegap/cordova version. Best, |
BTW - I believe the latest pull request solved this problem, please let me know if that was the problem! |
I tried the latest version on Android and it works perfectly with storeImage: (typeof options.storeImage !== "undefined") ? options.storeImage : 0,
pixelDensity: (typeof options.pixelDensity !== "undefined") ? options.pixelDensity : 1, In ImageResizePlugin.java if (params.getBoolean("storeImage")) {}
if (params.getBoolean("pixelDensity")) {} It's complaining about not being able to convert 0 or 1 into a boolean. I fixed it by specifying true of false for both options. I don't know about iOS, but it'd be best to have correct default values. |
I have the same issue... it should be true/false instead of 0/1, right? |
changed them
to
and it seems to be working well. before that I was getting |
I was under the impression that the last pull twist actually fixed it. I still haven't got the chance to test it thoroughly. Sadly other things on the agenda keep me occupied :-) |
Yes using a boolean should work on iOS too: bool storeImage = [[options objectForKey:@"storeImage"] boolValue];
bool accountForPixelDensity = [[options objectForKey:@"pixelDensity"] boolValue]; @tslater if you test on iOS please tell us if the rest works, because I had to modify some things for the plugin to work. |
I have updated the js file to send boolean values instead of numbers - 0b4fa1e |
Hi,
When resizing an image with a file uri as a result (and not base64) the app CRASHES.
I have tried numerous options for the options.directory, and options.filename.. none worked. Eventually the result was the same - CRASH.
What am I doing wrong?
Is there a sample of a file uri as a result somewhere?
Thanks,
Doron
The text was updated successfully, but these errors were encountered: