-
Notifications
You must be signed in to change notification settings - Fork 52
Filling color crosses the boundry #12
Comments
Facing the same issue.. |
Right now I have one assumption that may last pull cause this problem. You can check this here : https://github.com/Chintan-Dave/UIImageScanlineFloodfill/pull/11/files Undo this file changes and see what happen. Let me know about this. |
okay i will comment after completing this. but i have already checked this repo about 1.5 months ago and faced the same issue. however this pull is 14 days old. |
The pixels in that area are empty . Should i create a tag for this repo on StackOverFlow? |
I am not getting what is "empty". You mean transparent? |
Yes transparent .. check this sample image http://i1341.photobucket.com/albums/o750/Quamber_Ali/circle4_zpsf0e3b7af.png |
Dear Chintan, I tried reverting to pull # 10 and then check the issue still exists. Please Help.. |
Did you checked this.? |
Right now I am busy in other work so can't solve this. You can try one thing. Find values(RGBA) for transparent colour and put condition according to that. |
Hi Chintan, |
Chintan, i tried to put old alpha on the new one so that the transparent remains transparent. but still of no use. Should i send the changes classes ? Also that if you about these bugs and are unable to resolve please let me know. |
Hi Chintan, I have resolved the issue with simple memset() function after the malloc() call. It came out exactly what i expected, due to limited memory available on iphone / ipad (specially simulator) i suspected that malloc() may allocate memory in heap where there is junk data (from last to floodfill malloc call) so i simply set every pixel (data in memory ) to 0 before drawing the image in context. Under my testing it is working smoothly. I have forked (accidentally) your code and will update it soon with complete description. |
Hi @drmaxmad ....How you used this "memset() " function...Plz tell me.... |
Hi, |
Ok..thnx a lot...:) |
@drmaxmad memset comment help me a lot but it took some time to figure out how to use that function. I am adding the exact line of code here. Search for malloc and place the below line after that. |
@bismasaeed00 I added func memset: Could you please tell me a solution for it? |
Hi Bisma,
Its been long time, i think you are getting this because of the image data
that you are trying to convert. Make sure that image does not have alpha
channel, please try that with image white background.
…On Thu, Dec 7, 2017 at 1:15 PM, Cu-Toof ***@***.***> wrote:
@bismasaeed00 <https://github.com/bismasaeed00> I added func memset:
unsigned char *imageData = malloc(height * width * 4); memset(imageData,
0, height * width * 4);
But issue still isn't solved and crash when I touch outside image:
[image: screen shot 2017-12-07 at 15 09 54]
<https://user-images.githubusercontent.com/9766953/33704872-bf22f9e0-db60-11e7-9888-fb809efcaa25.png>
Could you please tell me a solution for it?
thanks,
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABqBXqb6Upr6AkCULxbKATBoVi-hcJwOks5s956NgaJpZM4BsgyD>
.
--
Best Regards | Mit freundlichen Grüßen |تفضلوا بقبول فائق الإحترام والتقدير
| ystävällisin terveisi | 宜しく
*Bilal Ashraf*
Software Engineer / Mobile (iOS, Android) Developer
PK :+92 321 5041 775
|
Hi Chintan,
The issue is
The text was updated successfully, but these errors were encountered: