Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong convert INKSCAPE-SVG to PNG #193

Closed
varlesh opened this issue Nov 4, 2016 · 15 comments
Closed

Wrong convert INKSCAPE-SVG to PNG #193

varlesh opened this issue Nov 4, 2016 · 15 comments
Labels

Comments

@varlesh
Copy link
Collaborator

varlesh commented Nov 4, 2016

It's very strange. I don't know it's bug inkscape or ...
Script convert icon with background, but background - it's not layer!
For example, clementine-panel from Papirus Arc Dark (for KDE).

On left original icon - on right converted with script.
image
Converted icon have background #f7f7f7 but really background from source transparent!
Script convert pagecolor to layer. But why?!
source:
https://github.com/PapirusDevelopmentTeam/papirus-icon-theme-kde/blob/master/papirus-arc-dark/22x22/status/clementine-panel.svg

 id="namedview88"
     inkscape:object-nodes="true"
     inkscape:object-paths="true"
     objecttolerance="10"
     pagecolor="#f7f7f7"
     inkscape:pageopacity="1"
     inkscape:pageshadow="2"
     showborder="true"
     showgrid="false"
     showguides="true"

i know, pagecolor option not available on PLAIN-SVG... but maybe available method for fixing INKSCAPE-SVG?

@varlesh
Copy link
Collaborator Author

varlesh commented Nov 4, 2016

I'm delete icon cache, update script from git and run twice. Bug reproduced with INKSCAPE-SVG icons...
I know need save icons as PLAIN-SVG, but i must remake all tray icons - it's very long work and have more icons... because Developers like hardcoded :(

@bilelmoussaoui
Copy link
Owner

Tried with Numix theme, and the issue is only reproducible with your theme :(

@andia89
Copy link
Collaborator

andia89 commented Nov 4, 2016

@varlesh You could try some svg-cleaning scripts (https://github.com/RazrFalcon/svgcleaner) that removes all of the unneeded parameters

@varlesh
Copy link
Collaborator Author

varlesh commented Nov 4, 2016

@wa4557 I previously used this util and after some SVG's will bee broken. For example, cleaning icon not change color anymore.

@varlesh
Copy link
Collaborator Author

varlesh commented Nov 4, 2016

Maybe it's possible add option for ignore pagecolor?

@bilelmoussaoui
Copy link
Owner

If you can figure out how to do that with Inkscape command line, i would be more than happy to implement that 👍

@varlesh
Copy link
Collaborator Author

varlesh commented Nov 4, 2016

it's pagecolor. I confirm this.
Icon saved as PLAIN-SVG and converted with script:
image

@varlesh
Copy link
Collaborator Author

varlesh commented Nov 4, 2016

@bil-elmoussaoui
-l, --export-plain-svg=FILENAME

Export document(s) to plain SVG format, without sodipodi: or inkscape: namespaces and without RDF metadata.

https://inkscape.org/en/doc/inkscape-man.html#options

@bilelmoussaoui
Copy link
Owner

Well in that case just run a bash script that will export all your svg icons as plain ones? I can provide one if you want to :)

@varlesh
Copy link
Collaborator Author

varlesh commented Nov 4, 2016

But if another (future) icon theme have this INKSCAPE-SVG or NUMIX too?
Maybe better add this option on script? And i'm will be happy ... and others too!!!

@varlesh
Copy link
Collaborator Author

varlesh commented Nov 4, 2016

Yes, convert time will. But all icon theme will be converted right.

@bilelmoussaoui
Copy link
Owner

Well, Numix does not have this issue :) if any future icon theme has this issue i will link this issue with the script i'm going to provide. The reason why i'm not willing to implement this directly on Hardcode-Tray because we will have the same result if the user uses Cairosvg we will face the same issue again. So better fix it from the source!
The script will walk in the directory you provide and fix all the icons in there, so it's up to you to decide which directory of your theme should be fixed :)

@varlesh
Copy link
Collaborator Author

varlesh commented Nov 4, 2016

I hate inkscape!!! :( Ok, i'm go clean SVG's...

@varlesh varlesh closed this as completed Nov 4, 2016
@bilelmoussaoui
Copy link
Owner

I do hate it too! Good luck with that 👍

@varlesh
Copy link
Collaborator Author

varlesh commented Nov 4, 2016

Thx :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants