Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wickdchromosome/flood_fill_png
Essentially the bucket fill tool from MS paint (recursive flood fill algorithm implementation)
https://github.com/wickdchromosome/flood_fill_png
c educational examples floodfill
Last synced: 26 days ago
JSON representation
Essentially the bucket fill tool from MS paint (recursive flood fill algorithm implementation)
- Host: GitHub
- URL: https://github.com/wickdchromosome/flood_fill_png
- Owner: wickdChromosome
- Created: 2020-09-20T22:21:04.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-21T02:43:30.000Z (about 4 years ago)
- Last Synced: 2024-03-12T15:29:08.812Z (8 months ago)
- Topics: c, educational, examples, floodfill
- Language: C
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple recursive flood fill algorithm implementation
## What the algorithm looks like in action
## Introduction
This was made based on the wikipedia page on the flood fill algorithm: https://en.wikipedia.org/wiki/Flood_fill## Compilation
If you have gcc and libpng-dev installed, you can compile the code by doing:
```
./compile.sh
```
If you are on Debian, you can install libpng by doing:
```
sudo apt install libpng-dev
```## Example
This is an implementation of the recursive version of the flood fill algorithm, so
it is only feasible for usage with smaller images. __test_img.png__ is a test file you can use.For example, using the test image, you can do:
```
./flood_fill_png test_img.png 60 70 255 255 255 255 0 255 255 150 example_out.png
```
Which turns the test image from:
To: