← Back to team overview

kicad-developers team mailing list archive

Re: old pcbnew file format in bitmap2component tool

 

----- Original Message -----

> From: Dick Hollenbeck <dick@xxxxxxxxxxx>
> To: kicad-developers@xxxxxxxxxxxxxxxxxxx
> Cc: 
> Sent: Wednesday, August 20, 2014 5:23 AM
> Subject: Re: [Kicad-developers] old pcbnew file format in bitmap2component tool
> 
> On 08/19/2014 05:00 AM, Cirilo Bernardo wrote:
> 
>>  While working on the bitmap2component tool to add support for
>>  placing bitmaps onto the planned Underlay 1/2 layers I noticed
>>  that the deprecated *.emp export format is still supported by
>>  the tool. If there are no objections I'll remove that option
>>  as part of my work on this feature. Given the way KiCad and
>>  pcbnew in particular has worked for almost a year and the more
>>  recent introduction of more layers, I don't see a need to
>>  maintain the ability to import images to the older format.
> 
> 
> No reason to remain emp-athic to that format.
> 
>

First an apology - I clicked 'Reply' instead of 'Reply to All' so
I'm reposting this to the list:

OK, I ripped out support for the deprecated EMP format. Before I
double-check everything and make a patch, I noticed while testing
that the user needs to supply the file extension. Is this acceptable
behavior or should I put in some code to enforce the extensions?
My personal preference is to enforce extensions since we need them
to filter file names anyway, but I thought I'd ask first.

The only (inevitable) glitch in the code is that the previous
settings read from the configuration file may not be valid,
but that's handled by an if block. I'm also cleaning up some
"case: N" sort of statements and using enums so I don't see any
numeric constants and wonder what the hell it is. The only down
side to that is I may introduce a new header file which only
declares a single enum - but that may be the price of readability.


- Cirilo


References