Chintan-Dave / UIImageScanlineFloodfill

This is an Objective-C implementation of Scanline Flood Fill Algorithm.
MIT License
159 stars 52 forks source link

Color based tolerence difference and border gaps #19

Open mkeremkeskin opened 9 years ago

mkeremkeskin commented 9 years ago

As you can see from the screenshots i added. For the same tolerance value, different colors gives different outputs. For darker colors tolerance not working well as lighter ones.

For this I can assign different tolerance values via observing for each color. But if I do that another problem occurs. If I fill empty space with with blackish color (r 33 g 39 b 33) and with high tolerance value(e.g. 200) the color connects with border and if I color the space with another color the below screenshot happens.

Does anyone encountered these problems? Do you have an idea how to solve these problems?

screen shot 2014-12-25 at 15 59 00

// // // ------------ Different tolerance behaviour for different colors --------------

screen shot 2014-12-25 at 14 46 07 screen shot 2014-12-25 at 14 45 52 screen shot 2014-12-25 at 14 46 01 screen shot 2014-12-25 at 14 45 35 screen shot 2014-12-25 at 14 45 46

Chintan-Dave commented 9 years ago

Hi. Can you provide me original image so I can test it.

mkeremkeskin commented 9 years ago

Hi, Chintan. I've added the original image.

portre03_pi

Chintan-Dave commented 6 years ago

@mkeremkeskin I have tried image provided by you. It seem like we have hard time with alpha.

I am still working on that. Mean while you can try converting this to JPEG because that is working well for now.