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

Replace some PNG flags with their SVG versions #110

Merged
merged 1 commit into from
Jul 30, 2019

Conversation

aplaice
Copy link
Collaborator

@aplaice aplaice commented Jul 25, 2019

Ideally all the remaing PNG flags would be replaced with SVG versions, but some of the SVG's on wikimedia are rather large. The criterion for choosing which to replace was if the SVG optimised with svgo was smaller than 62 kB (cut-off was raised from my initial goal of 60 kB, so that Saint Helena at 61 kB could just scrape in...).

(I haven't forgotten about providing sources for some of the remaining flags and maps!)

@axelboc
Copy link
Collaborator

axelboc commented Jul 27, 2019

I'm not quite sure about this one. It's basically about raising the cut off I chose initially, which seems to have been 40 KB, up to 62 KB. Is it really worth it? The current PNGs look pretty sharp to me. What's your thinking?

@aplaice
Copy link
Collaborator Author

aplaice commented Jul 27, 2019

I'm not quite sure about this one. It's basically about raising the cut off I chose initially, which seems to have been 40 KB, up to 62 KB. Is it really worth it? The current PNGs look pretty sharp to me. What's your thinking?

You're probably right that it's not worth it. Some of the flags are a bit blurry when you zoom in,on Ankidroid, but it's not a major issue.

To be honest, before starting, I had hoped that the size of the SVGs on Wikimedia had been brought down in the meantime (for comparison, see the flag of Portugal, which has quite a lot of detail, and whose size had been reduced by 80 % between 2010 and 2014, to just 13 kB) and that svgo's efficiency had been increased, but neither of these appears to have occurred (not that I'm really allowed to complain since I didn't help in either of these tasks :p).

OTOH considering that ~ 70 of the map files are over 40 kB (21 over 50 kB, 13 over 60 kB) lifting the cut-off to, say, 50 kB might not be too extravagant.

One thing that should be fixed irrespective of what happens to this pull request, though, is Fiji's flag which is currently somehow expanding beyond its borders and which it shouldn't be doing.

@axelboc
Copy link
Collaborator

axelboc commented Jul 28, 2019 via email

@aplaice
Copy link
Collaborator Author

aplaice commented Jul 28, 2019

Including the space regained from the removal of the old PNGs, it should increase the deck's size by ~ 90 kB.

Ideally all the remaing PNG flags would be replaced with SVG versions,
but some of the SVG's on wikimedia are rather large. The criterion for
choosing which to replace was if the SVG optimised with svgo was
not larger than 50 kB.
@axelboc axelboc merged commit aff5d8a into anki-geo:master Jul 30, 2019
@axelboc axelboc added the chore Documentation, licenses, repository structure, dependency upgrades, etc. label Jul 30, 2019
@axelboc axelboc added this to the v3.2 milestone Jul 30, 2019
@aplaice aplaice deleted the svg_flags branch August 19, 2019 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Documentation, licenses, repository structure, dependency upgrades, etc.
Development

Successfully merging this pull request may close these issues.

2 participants