Coder Social home page Coder Social logo

swinz / uiimagescanlinefloodfill Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chintan-dave/uiimagescanlinefloodfill

0.0 2.0 1.0 6.58 MB

This is an Objective-C implementation of Scanline Flood Fill Algorithm.

License: MIT License

Objective-C 98.60% Ruby 1.40%

uiimagescanlinefloodfill's Introduction

<title></title>

UIImageScanlineFloodfill

      
                  Before use Flood Fill                                                           After Using Flood Fill
 
I have used Scanline Floodfill Algorithm because it is faster than 4 way and 8 way.
And implement using iterative logic because iPhone have very limite capicity compare to computera and recursive implementation make stackover flow exception.
 
I have try my best to make it fast but it is still in its beginning phase so any suggestion and contribution is welcome.
 
This is part of my iOS drawing app.
When I search for flood fil on google I found that there are many implementation for c, c#, Java
But for Objective - C there are oonly 2 or 3 implementation and not very easy to understand.
So I decide to share my work.
 

I like to give thanks to following post:

How It Work ?

For Implementation detail visit : Scanline Flood Fill Algorithm with (or without) Tolerance in Objective-C

How To Use It:

If you wan to use this directly in your project that do as follow:

  1. Copy Folllowing file in your project
    1. LinkedListStack.h
    2. LinkedListStack.m
    3. UIImage+FloodFill.h
    4. UIImage+FloodFill.m
  2. UIImage+FloodFill.h file where you want to use this .
  3. Call flood fill function with all argument like folloeing

UIImage *image1 = [self.image floodFillFromPoint:tpoint withColor:[UIColor grayColor] andTolerance:tolerance];

License : MIT LICENSE FILE

uiimagescanlinefloodfill's People

Contributors

ariskox avatar chintanzwt avatar gutoaraujo avatar kamilpowalowski avatar petehare avatar psymiley avatar

Watchers

 avatar  avatar

Forkers

arunjnair15

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.