Why are svg files not made smaller using scour?
神癒礁湖 (Rafael Laguna)
rafaellaguna at gmail.com
Wed Nov 7 08:20:53 UTC 2012
I apppreciate a lot your info. I'll take a look into that python script.
But I will continue using the Inkscape batch one. I prefer treating the
icons as Inkscape SVGs, not as standard SVG, because some gradients and
clipping masks are a bit more complex than XML/SVG standard definitions.
In a folder I've recently "compressed" the real gain was about 40%, pretty
similar to Scour.
Thanks so much for your apport ;)
--
紳癒礁湖 (Rafael Laguna)
Lubuntu Artwork Team
2012/11/7 Hitesh Shah <chimak111 at gmail.com>
>
>
> On Wed, Nov 7, 2012 at 2:50 AM, 神癒礁湖 (Rafael Laguna) <
> rafaellaguna at gmail.com> wrote:
>
>> Sorry, missunderstood you. To reduce file sizes on all icons I use to
>> run a script of my own that Inkscape itself healthy to clean them. I use
>> that script when updating a whole icon folder.
>>
>> But I must warn you that reducing "too much" the svg files may damage
>> some xml attributes and become ugly or totally useless. There are some svg
>> attributes that I intentionally put in an icon that "shrinkers" ignore.
>>
>> --
>> 紳癒礁湖 (Rafael Laguna)
>> Lubuntu Artwork Team
>>
>
> @Julien, I have no experience in packaging and I've never used the dh
> command.
>
> @Julien and @Rafael,
>
> Yes, aggressive use of scour could possibly damage things but I'm not sure
> that just the default settings could be harmful. I'll give an example of
> the screen output below for scouring
> /usr/share/icons/lubuntu/devices/48/phone.svg.
> As a precaution I copied the file to my desktop and ran the following
> command:
> python /usr/share/pyshared/scour.py -i phone.svg -o out.svg
>
> The output on the screen shows what scour did:
> [06:17 AM] ~/Desktop $ python /usr/share/pyshared/scour.py -i phone.svg -o
> out.svg
> scour 0.26
> Copyright Jeff Schiller, Louis Simard, 2010
> File: phone.svg
> Time taken: 0.49s
> Number of elements removed: 53
> Number of attributes removed: 273
> Number of unreferenced id attributes removed: 0
> Number of style properties fixed: 36
> Number of raster images embedded inline: 0
> Number of path segments reduced/removed: 144
> Number of bytes saved in path data: 1728
> Number of bytes saved in colors: 234
> Number of points removed from polygons: 0
> Number of bytes saved in comments: 0
> Number of bytes saved in id attributes: 0
> Number of bytes saved in lengths: 70
> Number of bytes saved in transformations: 403
> Original file size: 56781 bytes; new file size: 24244 bytes (42.69%)
> [06:26 AM] ~/Desktop $
>
> I agree that there is a possibility that some files could be damaged, but
> in the few days I been playing around, I haven't seen any damage caused by
> using scour.
> (There are settings that could be make scour more aggressive but I'm only
> using the defaults.)
>
> --
> Lubuntu-users mailing list
> Lubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/lubuntu-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/lubuntu-users/attachments/20121107/a795c185/attachment.html>
More information about the Lubuntu-users
mailing list