KiCad Bitmap2Component Scaler

This script scales the size of a Bitmap2Component output .mod file to preserve image detail.
Back to Tools

NOTE: Script is pretty much hardcoded, only works with an untouched Bitmap2Component output .mod file. Aspect ratio is locked, hence new width is only needed.

You can see the difference when using this tool: Example

If you want some extra detail in the Pcbnew logos you generate from Bitmap2Component follow this steps:
1. Get a nice and big rasterized version of the drawing you want to convert. Example: for a final logo width of 0.5in get a source image width of (0.5in * 300ppi * 3) = 450 pixel, or resize it if it's too big with any image edition software, make sure the logo is correctly centered and there's some pixels left on each side, otherwise Bitmap2Component will generate nasty vectors on those edges 2. Bitmap2Component inverts the image with a bug in the top left corner, so we have to invert it manually with our image edition software. 3. Open Bitmap2Component and click on "Black&White Picture" tab, adjust the threshold value slider to the desired setting. The white areas are the ones that will be vectorized. Click in the "Export to PCBNEW" button and save it somewhere. This logo will be 3x0.5in because Bitmap2Component translate 300 pixels into 1 inch, and the formula we used was (0.5in * 300ppi * 3) the "3" means we generated an image 3 times larger, but also with 3 times the detail !

Now use this tool to resize to desired width, rename component and even change layer !

(Here you need to input the .mod file that Bitmap2Component generated)
inches mm proportion
Complete name with settings (example: "name_F.SilkS_5mm_flipped.mod")

(Useful for back layers)