paint bucket for white area image

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
rijaaall
Posts: 17
Joined: Tue Jun 12, 2012 10:49 am

paint bucket for white area image

Post by rijaaall » Wed Jun 13, 2012 1:34 am

can anyone help me to coloring the with area of image which is uploaded, using paint bucket?
the method are : upload image - thresholding image - coloring the white area - save image after processing
and now, i stuck at coloring the white area.
can anyone help me?

regard..
-urgent- :(

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: paint bucket for white area image

Post by bn » Wed Jun 13, 2012 6:56 am

Hi rijaall,

have a look at this thread:
http://forums.runrev.com/phpBB2/viewtop ... f=7&t=5822
there are a couple of stacks attached to this thread that seem to be related to what you want to do. Have a look at them.
You could do a search for Bantymom on the forum and it will show all the posts of BantyMom. She worked on filling white space with paint tools and this could turn up more example stacks for you to look at.

Kind regards
Bernd

rijaaall
Posts: 17
Joined: Tue Jun 12, 2012 10:49 am

Re: paint bucket for white area image

Post by rijaaall » Wed Jun 13, 2012 8:51 am

hello bn,

thank you very much for that, its very helpful :D

but, may i make it like a color picker? so, when i click at the white area, it will show the color picker, then user can choose what color that he want..
or, may it being another color randomly when the user click at white area?

-regard-

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: paint bucket for white area image

Post by bn » Wed Jun 13, 2012 9:00 am

Hi rijaall,

look in the dictionary for "answer color" and for brushColor.

Kind regards
Bernd

rijaaall
Posts: 17
Joined: Tue Jun 12, 2012 10:49 am

Re: paint bucket for white area image

Post by rijaaall » Wed Jun 13, 2012 9:08 am

hi bn,

I'm still confuse :(
could you explain it by example stack?

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Re: paint bucket for white area image

Post by bn » Wed Jun 13, 2012 2:53 pm

Hi rijaall,

here is a little stack that shows one of many ways how one can do what you want. Please have a look at the scripts and try to understand them.
answer color rijaall.livecode.zip
(39.14 KiB) Downloaded 232 times
Kind regards
Bernd

rijaaall
Posts: 17
Joined: Tue Jun 12, 2012 10:49 am

Re: paint bucket for white area image

Post by rijaaall » Sat Jun 16, 2012 10:16 am

thank you very much :)
my final project is already done :D

Post Reply