This utility converts an image into a Kicad .mod file for adding to a printed circuit board (PCB) layout. It is available both here as a web "service" as well as a downloadable python script.
Details: The image will be converted to grayscale, but you might want to do the conversion yourself to control the process. If the image has transparency, it will be removed by layering the image over a black background. Module name is the name of the module inside the .mod file. Scale factor influences how large the output module is. Each input pixel becomes (0.0001" * scale factor) wide and tall. If you want to invert the image, check the "invert" box. The "preview" option displays the size and converted image, uncheck to download the .mod file directly.
This converter does a very basic conversion at the pixel-level. Adjacent pixels or filled areas are handled as individual pixels, and not merged or anything like that (could be a future enhancement). Each output pixel is a filled polygon with five points (repeated start/end point), and looks something like this in the mod file:
DP 0 0 0 0 5 1 21 Dl 0 0 Dl 100 0 Dl 100 100 Dl 0 100 Dl 0 0
This tool is also available as a standalone python script. To run this script, use something like this:
./img2mod.py input.png output.mod LOGO 200More details are available in the included README file.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This tool was written by Matthew Beckler of Wayne and Layne, LLC.
![]()
Questions? Comments? Please let us know what you think of this tool. Contact us.