← Back to team overview

kicad-developers team mailing list archive

Re: Re: [PCBNEW] Import png, jpeg or svg or dxf ?

 

On Thu, 18 Jun 2009, jean-pierre.charras wrote:

Well, I believe many users could be disappointed  if they use a logo created by a graphic designer and
convert it from a full SVG file to a single black and white logo.
Why: because this logo is not necessary designed for this
In most of cases a smart logo could be seen as a very poor picture after conversion.
And, of course, for many users, the result is: Kicad does not work very well when importing a logo
(Kicad is guilty, and NOT the binary conversion is guilty).

I agree with this too, but there needs to be some sort of compromise for not being too dumb, just because of the dumb users (not that I think there are many dumb ones). We should also state what we support in SVG import as it makes no sense to support it fully (the reasons already stated by you and Dick). That also may mean the functionality can not be called SVG import if we do not support it fully. Maybe parse SVG and throw exception stating "Too demanding graphics, Gerber conversion not possible." or the like. No feature cutting from advanced users, pretty please. Maybe something like "Enable advanced/experimental features" in settings dialog ;)

You must consider this:
- Convert a png file to a vectored representation usable in kicad via Potrace  is not a lot of work.
- this work will be useful (and mandatory) to solve some problems found in SVG  import (Bezier curves
to Polygon conversion)
- This could be useful to import logos from a scanned picture (usually in PNG or JPEG or other bitmap
format)
- 99% of users  expect to import bitmaps logos (or boards scanned from a picture) in pcbnew and do not
have a SVG file as source.

Yes, dumbing goes here too, but I see much use for this if also refined to allow easy remaking of old boards.

- SVG is a powerful language, so a SVG import needs a lot of work to be usable, i.e. to be able to
read files from graphic editors without errors,
 and just to use 1% or less (and not 30% Alas!) of its possibilities. How do you expect to convert
tranparency, exotic fonts, bitmap data ...
( by the way, Inkscape uses Potrace to import some bitmaps)
- A simple PNG import allow us to see some problems in logo imports, give us an experience, with a
*very reasonable* amount of work.
  99% of this work is needed to have a SVG import.

- More important: we need a volunteer to do the job. So this volunteer is the guy who decides what
import is made.
No volunteer, no import.
So the volunteer is more important than the file format.

Just like it should be :) I don't want to argue what to do, but just provide (my personal) insight in case someone finds it valuable. I should be coding - talk is too easy.

I saw it. But:
-  potrace is able to give exactly the same thing from a bitmap (have you tested Potrace ?)
- It was perhaps designed for a binary logo, so a good look is not surprising, but this is not the
case for most of logos.

I've tested Potrace in Inkscape just for tracing old PCBs, but it was far from perfect. Maybe there are some more tuning options than Inkscape exposes, but I haven't tested them. Tracing for PCBs is quite a specific use, so I think it would need a good heuristics rule set for getting good traces. Most of the time good enough resolution gave so many vectors that hand editing became too complicated.

IMHO it's designers duty to make single colour version available alsoi if needed :P... Anyway, many firms do have variable detail level logos for different use.

This advantage and the power of a graphic editor like Inkscape do not solve the limitations of Gerber
files and the PCB process that allows only poor binary pictures.

I know. I meant _only_ the usable subset of the SVG. All the time if not apparent. Thank you for your time again :)

-Vesa






References