Skip to content

Latest commit

 

History

History
54 lines (47 loc) · 1.15 KB

README.md

File metadata and controls

54 lines (47 loc) · 1.15 KB

Rectilinear Polygon Extractor

Description

This is a tool that converts an image with a transparent background to a recilinear polygone. It outputs the points as JSON or SVG if the program is ran with --output-as-svg.

Catch

This program can't handle:

  • Single pixel images
     +---+---+---+
     |   |   |   |
     +---+---+---+
     |   | * |   |
     +---+---+---+
     |   |   |   |
     +---+---+---+
    
  • Images with a protruding single pixel
     +---+---+---+
     |   | * |   |
     +---+---+---+
     | * | * | * |
     +---+---+---+
     |   | * |   |
     +---+---+---+
    
  • Images that contain a multiple sections
     +---+---+---+---+---+---+---+---+---+
     |   | * | * | * | * |   |   |   |   |
     +---+---+---+---+---+---+---+---+---+
     |   | * | * | * | * |   | * | * | * |
     +---+---+---+---+---+---+---+---+---+
     | * | * | * | * | * |   | * | * | * |
     +---+---+---+---+---+---+---+---+---+
     | * | * | * | * | * |   | * | * | * |
     +---+---+---+---+---+---+---+---+---+
     | * | * | * | * | * |   | * | * | * |
     +---+---+---+---+---+---+---+---+---+
     |   |   |   |   |   |   | * | * | * |
     +---+---+---+---+---+---+---+---+---+
    

Build

gcc -o nobuild nobuild.c
./nobuild