androideclipseimageandroid-framework

How to process an image for an android coloring book app?


I have an idea for a coloring book kind of app for Android devices.

However, I have no experience in actually processing the images so that I could color them. I fear that my question may be too vague, but that's the best I can do with my experience, so please bear with me if you try to answer (:

So here is my question. At the moment I am not looking to use any sprite-based engine, as I don't have the means to pay for the ones I know how to work with. So that leaves me with using the basic Android framework.

The result I am seeking is having an image like this:

Mandala

And have the user of the app choose a color and fill in the white spaces.

I can manage doing the ui and programing the other parts of the app, however I have NO IDEA AT ALL how to process an image like this so that the app could recognise the white spaces as segments and gain the ability to color them.

If you need more information regarding my question please ask away!

Thank you in advance, oh glorious stackoverflow community <3


Solution

  • Check this link : Android flood-fill algorithm

    Use the QuickLinearFloodFilelr to fill the white areas.

    Like this:

    QueueLinearFloodFiller f = new QueueLinearFloodFiller(mBitmap,clr_int,mPaint.getColor());
                f.setFillColor(mPaint.getColor());
                f.setTargetColor(clr_int);
                f.setTolerance(10);
                f.floodFill(p1.x,p1.y); //fill bitmap, at p1 with p1's color and fill with Color from Switch