-
Notifications
You must be signed in to change notification settings - Fork 79
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
Create blurred images of flags per #220 #247
Conversation
Adding per issue #220 |
These look lovely! Thanks! Differences between blurred and unblurred flagsOne issue is that the Wikipedia flags for Bolivia and El Salvador have apparently changed between the time they were added to The Bolivian flag that we had been using was Flag of Bolivia (state).svg ( In the case of El Salvador's flag, it seems to be a case of a new, corrected version of the same Wikimedia file, and the changes were made last year, so if there was scope for reverting a misguided edit, it probably would have been done. Again, without reading into the relevant laws I can't be 100 % certain, but here, I think, we should stick to the latest version (and update File-size OptimisationIn general, we try to keep the image file sizes as small as possible (many people use this deck on mobile devices with limited storage, and while the difference between a single 50 kB and 40 kB file isn't critical for anybody, it does add up). If you have access to PNGGauntlet or just optipng, then please run it on the blurred PNGs. If you don't then it's not a big deal — I could do it instead.
|
Awesome, thanks for the feedback on how you process/document images, I can easily do all of it. The only question is whether to use the older Bolivia flags or newer ones. Adding the blur effect is easy, so "avoiding repeating the blurring" is not a big deal from that perspective. We just need to figure out what image we think Wikipedia is most likely to use long-term. |
Concerning the flag of Bolivia, I found this archived talk thread which casts even more doubt on what the correct flag version is. On the other hand, this Boston Globe article shows that in the 2018 Olympics, Bolivia used the flag currently in the deck. So that this PR can be accepted expediently, I'll commit a version based on the existing deck flag (so ignoring that Wikipedia was updated). If the Wikipedia change sticks for long enough, a new issue can be opened to update both flag images. |
Bolivia's flagThe difference between the two flags is in the coat of arms. The official document defining it is here (in Spanish). Comparing the description with the two Wikimedia images, I think that "Bandera_de_Bolivia_(Estado).svg" is slightly more accurate. For instance, it includes the yellow internal lining of the main oval, while "Flag of Bolivia (state).svg" doesn't. (OTOH, to the extent that I can tell, the blue colour of the oval is slightly more accurate in "Flag of Bolivia (state).svg" — unfortunately Pantone seems to have deprecated its old CVU (and CVC (uncoated and coated, whatever it means)) colours and switched to just C, so I can't find an entirely trustworthy source of what exactly "Blue 2995 CVU" is.) Comparing the images with those on Bolivia's governmental sites (a high-quality modern version of the coat of arms and a painting of the coat of arms), it also seems that "Bandera de Boliva (Estado)" is closer. From a Wikimedia history point of view, it looks like "Bandera de Boliva (Estado)" was created because "Flag of Bolivia (state).svg" was locked. On the whole I think that "Bandera de Boliva (Estado)" (the newly linked flag) is better. I could open discussions on the relevant Wikipedia talk pages, but since I agree with the current state of the articles, I don't think that it's worth it. (Ideally, "Flag of Bolivia (state).svg" would be updated, but looking at the Talk page where the suggestion was already declined once, I don't have much hope.) |
That also works and is arguably better from the point of view of not bundling significant (the change in the flag of El Salvador is insignificant enough :)) unrelated changes in a single PR! |
I believe I've addressed all the feedback from @aplaice, please let me know if I missed anything! |
Thanks! You have a copy-pasted typo in Also, I'm not quite sure why*, but there's still a very slight discrepancy between our current unblurred flag of Bolivia and the blurred version — the colour of the clump of wheat in the lower right of the coat of arms is different. * I think it's a conversion artefact — all of the old versions of Flag_of_Bolivia_(state).svg that have the same design, have the same colour of the wheat as the current version. None of the old versions of Flag_of_Bolivia.svg matches either. When I convert Flag_of_Bolivia_(state).svg with inkscape ( Hence, we need to either update (Obviously, I recommend the former, at least for the time being.) |
I can't remember where the PNGs come from. I feel like perhaps I downloaded them as 500px PNGs from Wikimedia and then scaled them down to a height of 250px in Photoshop, which would have been stupid of me. Or perhaps I did export them from Inkscape, but an old version... Either way, I agree, @ukanuk would you mind updating |
It sounds like you are both saying that Wikipedia's PNGs are bad, and the one exported with Inkscape is good. This is true in general, Wikipedia has many SVG to PNG conversion issues from using librsvg, documented at Wikipedia:SVG help, Help:SVG, Librsvg bugs, Category:Pictures showing a librsvg bug, Commons:Transition to SVG, and Commons:Commons SVG Checker. However in this particular case, the problem actually is Inkscape because of a bug with fine lines when zoomed out (and original launchpad bug). You can see this directly in Inkscape, just start zooming in/out and you will see the wheat suddenly change color. On my system, the wheat is dark at 71% zoom but light at 70% zoom. When zoomed out, those fine black lines blur together making the wheat appear darker. Inkscape stops rendering lines at all at certain zoom levels, making the wheat appear as just the background color with no black lines darkening it. Note this same color change is happening to the church on the hill, although it's much less noticeable because it's so much smaller. Inkscape 71% zoom (correct darkness): Inkscape 70% zoom (incorrect due to hidden lines) Therefore, If/when the Inkscape bug is fixed, we should convert all the PNGs in the deck with Inkscape. Ideally this would be automated with a script, taking a folder of all the source SVG images (from Wikipedia and manually blurred with Inkscape) and automatically exporting everything to PNG with height=250px using Inkscape, then compressing everything with PNGGauntlet. |
Makes a lot more sense, now, thanks for investigating. Since both Inkscape and Wikimedia ouptut the wrong saturation, I don't get why |
All images generated from SVGs using Inkscape's Gaussian blur, available in "Filters > Blurs > Blur...". A different amount of blur was applied depending on the flag: Country, Blur value (both horizontal and vertical) Bali, 3.5 Bolivia, 3.5 El Salvador, 3 Guam, 5 Nicaragua, 3.5 Paraguay, 1.5
Fixes #220 |
All images generated from SVGs using Inkscape's Gaussian blur, available in "Filters > Blurs > Blur...". A different amount of blur was applied depending on the flag:
Country, Blur value (both horizontal and vertical)
Bali, 3.5
Bolivia, 3.5
El Salvador, 3
Guam, 5
Nicaragua, 3.5
Paraguay, 1.5