convert color image to black & white

You must Login before you can answer or comment on any questions.

Hi, I found so much articles for resizing the image taken by camera and from phone gallery. But i want to know if there is any method in appsceletor API for converting color image to a black & white image ?

3 Answers

Sandeep

What mobile platform are you developing for?

I've not heard of any native tools that will do this currently. Personally, I would just send the file to my web server, running a webservice that converts images using the following imagemagick command:

convert yourimage.jpg -colorspace Gray yourimage-gray.jpg
Cheers

— answered 3 years ago by Paul Dowsett
answer permalink
1 Comment
  • i am developing for both iphone and android. I think webservice will make network overhead, if this can be done on device itself that would be more efficient...

    — commented 3 years ago by Sandeep Kumar

Hello, avoiding the server side solution,that needs a connection, is slow and make traffic, you have just one,actually, workaround for it:

  1. take the picture
  2. open it with the webview that supports html 5 canvas object
  3. use a javascript graph library, here you can have access to the bite array function, to manipolate your image
  4. save it.

that all.

Andrea

— answered 3 years ago by Andrea S
answer permalink
3 Comments
  • does this thing supported in both iphone and android and for what minimum platform version for both ?

    — commented 3 years ago by Sandeep Kumar

  • yep, both devices support canvas.

    — commented 3 years ago by Andrea S

  • I'm trying to figure out how to some image manipulation, too. Did anyone get the html 5 canvas method working? Any code sample you're willing to share? :) Thanks.

    — commented 3 years ago by Trevor Borgmeier

Your Answer

Think you can help? Login to answer this question!