next up previous
Next: Processing of photos Up: Usage Previous: Usage

Processing of simple drawings

If the input image is monochrome and consists of lines only, you shouldn't need to change any options. The lines need to be at least 2-pixel-thick, because the program moves along a border of a figure until it returns to the start pixel, and since no pixel can be visited more than once, the algorithm will fail with 1-pixel-thick lines. In case of that, before the polygons are constructed, the image is searched for special 3x3 patterns, and most (if not all) flaws can be corrected. All 1-pixel-thick ,,bottlenecks'' will be simply removed, unless some other pattern applies. The pattern detection algorithm is still rather slow (brute-force), but at least it works quite reliably.

In case of grayscale or color (but still not geometrically-complex) input image, you might need to adjust the treshold, which controls the grayscale-to-monochrome conversion.

$ ./png2xp2 -t {treshold} {input_png_image} > {output_xp2_file}

The range of the ,,-t'' parameter is 0-255 (0 = black, 255 = white), the default value is 127.



Piotr Kamisiński 2005-05-12