← Back to team overview

kicad-developers team mailing list archive

Re: KiCad new look - new icons and new buttons

 

I have just finished convert ALL KiCad icons. I am now cleaning up all
the .svg files so that no useless attributes are included. I am using
this for the cleaning process:
http://codedread.com/scour/

I suspect that once the .svg files are clean the derived .png files
are clean too and maybe no additional png cleaning is necessary.

I'll be able to say more later today

Cheers
Fabrizio




On Tue, Aug 30, 2011 at 6:43 PM, Wayne Stambaugh <stambaughw@xxxxxxxxxxx> wrote:
> On 8/29/2011 10:39 PM, Dick Hollenbeck wrote:
>>
>>> On 08/29/2011 05:47 PM, fabrizio wrote:
>>>
>>>> 3)  .png generation from .svg.Are you using the script I made (scr/mk_png)?
>>> I am using the same exact steps and technique, but from CMake on an image by
>>> image basis, rather than a group step by group step basis.
>>
>>
>> You did well to find these steps, Fabrizio.
>>
>>
>> I have discovered that there are 3 or 4 "tEXt" chunks (i.e. records) in the
>> final PNGs, where the inkcape dude is telling about his name, inkscape's name,
>> and the date of creation.
>
> Dick,
>
> I just tried exporting a few SVGs to PNGs using InkScape on both Windows and
> Linux and I only get a single tEXt chunk with the Inkscape information.
>
>>
>> I'd like to remove all 3 or 4 of these to save space in the kicad programs,
>> since all these will be in memory as JPG files.  The shear number of PNGs
>> increases this justification.
>>
>> To see them, do:
>>
>> $ hexdump -C some.png | less
>>
>>
>> 000005d0  1b 7f 4e 4e 69 77 41 7a  00 00 00 14 74 45 58 74  |..NNiwAz....tEXt|
>> 000005e0  41 75 74 68 6f 72 00 4a  61 6b 75 62 20 53 74 65  |Author.Jakub Ste|
>> 000005f0  69 6e 65 72 e6 fb f7 2f  00 00 00 25 74 45 58 74  |iner.../...%tEXt|
>> 00000600  64 61 74 65 3a 63 72 65  61 74 65 00 32 30 31 31  |date:create.2011|
>> 00000610  2d 30 38 2d 32 38 54 31  30 3a 32 39 3a 33 35 2d  |-08-28T10:29:35-|
>> 00000620  30 35 3a 30 30 c7 99 61  14 00 00 00 25 74 45 58  |05:00..a....%tEX|
>> 00000630  74 64 61 74 65 3a 6d 6f  64 69 66 79 00 32 30 31  |tdate:modify.201|
>> 00000640  31 2d 30 38 2d 32 38 54  31 30 3a 32 39 3a 33 35  |1-08-28T10:29:35|
>> 00000650  2d 30 35 3a 30 30 b6 c4  d9 a8 00 00 00 19 74 45  |-05:00........tE|
>> 00000660  58 74 53 6f 66 74 77 61  72 65 00 77 77 77 2e 69  |XtSoftware.www.i|
>> 00000670  6e 6b 73 63 61 70 65 2e  6f 72 67 9b ee 3c 1a 00  |nkscape.org..<..|
>> 00000680  00 00 00 49 45 4e 44 ae  42 60 82                 |...IEND.B`.|
>>
>>
>> Your imagemagick composite step moves these chunks to the end of the file,
>> inkscape had them up front.
>>
>>
>> I tried:
>>
>> $ pngcrush -rem text some.png
>>
>> and it removes only one at a time, so I had to run it 3 or 4 times.
>
> Have you tried the alla or allb -rem option?
>
> >From the pngcrush man page:
>
> To do surgery with a chain-saw, -rem alla removes all known ancillary chunks
> except for tRNS, and -rem allb removes all but tRNS and gAMA.
>
> I particularly like the chainsaw reference.  I would test it myself but I can't
> seem to generate a PNG file with multiple text chucks to test it on and I'm not
> motivated enough to manually edit at PNG file with a hex editor just to try it out.
>
> Wayne
>
>
>>
>> And perhaps that is the best we can do.  Searched all around the internet and
>> could not find a tool to do this in one pass, removing all 3 or 4 "tEXt" chunks
>> in one pass.  Thinking about writing a C program to do it in one pass.  Don't
>> feel like patching pngcrush, since the source is *ugly* and life is short.
>>
>> Hoping for a miracle at this point, to avoid the 1.5 hours time for me to do it.
>>
>> If someone could track down the author of pngcrush, and whine, get it fixed,
>> that might qualify as a miracle.  Or if someone can find a free tool that
>> actually works in this regard, that would be helpful.  Or if someone wants to
>> write a program to do it that can become part of the source tree, you will be my
>> hero.  PNG file format is cake, just a series of well defined records, which you
>> preserve and write back out, with a header up front.  Drop the "tEXt" records
>> please.
>>
>>
>> Dick
>>
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
>>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>


Follow ups

References