I want to import a company logo into PCBnew. I’ve done some Google searches and found how to do it, but the methods apply to the previous version of KiCAD and PCBnew.
I have an eps file which I imported into an eps viewer, then saved it as a bitmap.
Then I went to a website to scale the bitmap as needed. It saved it as a library that I could import.
But I think the format of that library was for the old version. When I import it I am told it is not usable. There is an indication that it is old format.
So have any of you figured out this process for KiCAD 4?
Total dumb question, but wouldn’t it be better to convert the eps to svg and go from there?
Taking the b-route over rasterized graphics usually reduces quality… implying there is a svg to kicad_mod tool out there, but I was under that impression somehow.
There is:
It creates polygones
It can make features on any layer (layername in inkscape defines layer name in kicad)
The tool is able to scale your drawing and you can select the precision. (how many points are used to approximate your drawing)
Honestly, I’m bouncing around here a little. I’m back to working with the bitmap that I had created by converting from eps. Then I use the bitmap converter above and it creates a silkscreen part that I can place, but it is very large. So that tells me I’m getting close.
The missing piece for me is how to scale the bitmap down before I create the KiCAD part.
in the bitmap2mod module of KiCAD… at the top right of it’s window… there is a dots-per-inch setting.
Adjust that to get the size of the bitmap points relative to mm where you want it.
I converted from eps to bmp with on online resource.
I used Bitmap to Component Converter, as recommended.
I figured out how small I needed the silk logo to be then messed with the Bitmap info as you recommended until I got the desired size in mm. My resolution numbers ended up being 1600 and 1600 because of the size of the original logo file.
I couldn’t have done it without finding this forum and y’all being so helpful!
You could use inkscape to do that. (It’s open source)
But if you already use inkscape you could go the route of svg2mod. (This tool can put stuff on any layer you want and it can scale your result.)
(Just a suggestion for others and for you in future.)
Are there any new ways to do this? I have my logo in eps format as source from a designer. I needed it in svg though for a lot of uses but that would be plain svg, not Inkscape so I guess svg2mod will not help me here?
Even that was a bit hard for someone who’s graphical ui challenged like me, but I did:
epspdf is part of latex4mac and pdf2svg is on homebrew core:
❯❯❯ which epspdf
/Library/TeX/texbin/epspdf
brew install pdf2svg
Maybe that’s helpful for other OSX users.
So I tried Inkscape but I can hardly stand it on OSX, hdpi wasn’t working and the hole X11Quarts stuff is such a mess. It also can’t open this svg, it just hangs indefinitely. This is my svg, it’s pretty small:
Another approach would be to fork svg2mod to support my non-Inkscape use case. Just briefing the code, I understand that the underlying svg lib supports it fine and that it’s probably just a convenience with the layer mapping. I would be fine with just putting all paths on the layer I give command line (front silkscreen or bottom silkscreen). But I suck at python.
Yet another approach would be to try and find tools I’m more comfy with (node). Libs for parsing an svg there are tons of. Should be fine and the s-exp format is pretty simple. But I realize part of the whole thing is approximating bezier curves with multiple straight line segments which is part of that separate python svg lib. Should definitely be node libs around doing that too, but probably a bit of work digging for that…