NATION

PASSWORD

SVG nation flags

Bug reports, general help, ideas for improvements, and questions about how things are meant to work.

Advertisement

Remove ads

User avatar
Afsharid Persia
Lobbyist
 
Posts: 25
Founded: Dec 04, 2014
Inoffensive Centrist Democracy

Postby Afsharid Persia » Sat Nov 13, 2021 4:17 pm

[violet] wrote:
Afsharid Persia wrote:It looked fine when the file itself was viewed on Chrome, but once it was applied to the nation on NS, it had some weird lines around it, almost like an outline.

Where are you seeing an outline? I uploaded it to Testlandia and it looks correct to me.


Here, I've screenshotted a zoomed in comparison so you can see: https://imgur.com/a/J47POkH

The top screenshot is what it looks like after it is set as my flag on NationStates.

The bottom screenshot is how it looks in the flag preview before submitting changes. This is how it's intended to look.

User avatar
[violet]
Executive Director
 
Posts: 16205
Founded: Antiquity

Postby [violet] » Sun Nov 14, 2021 10:33 pm

Afsharid Persia wrote:Here, I've screenshotted a zoomed in comparison so you can see: https://imgur.com/a/J47POkH

The top screenshot is what it looks like after it is set as my flag on NationStates.

The bottom screenshot is how it looks in the flag preview before submitting changes. This is how it's intended to look.

Thanks for the screenie. This is a result of compression. It can be particularly heavy on images that are designed to be small, because it limits the precision of co-ordinates. So if you have a 1000x1000 SVG image where all the co-ordinates are integers, those won't be modified, but if that same image is presented in a 20x20 viewbox with co-ordinates like 10.41259, they will be truncated, and you'll lose precision.

User avatar
Valentine Z
Postmaster-General
 
Posts: 13006
Founded: Nov 08, 2015
Scandinavian Liberal Paradise

Postby Valentine Z » Sun Nov 14, 2021 10:34 pm

[violet] wrote:
Afsharid Persia wrote:Here, I've screenshotted a zoomed in comparison so you can see: https://imgur.com/a/J47POkH

The top screenshot is what it looks like after it is set as my flag on NationStates.

The bottom screenshot is how it looks in the flag preview before submitting changes. This is how it's intended to look.

Thanks for the screenie. This is a result of compression. It can be particularly heavy on images that are designed to be small, because it limits the precision of co-ordinates. So if you have a 1000x1000 SVG image where all the co-ordinates are integers, those won't be modified, but if that same image is presented in a 20x20 viewbox with co-ordinates like 10.41259, they will be truncated, and you'll lose precision.

That would explain why I have some small imperfections here and there when I use SVGs on the site. I have some decimal coordinates. Thanks for the information!
Val's Stuff. ♡ ^_^ ♡ For You
If you are reading my sig, I want you to have the best day ever ! You are worth it, do not let anyone get you down !
Glory to De Geweldige Sierlijke Katachtige Utopia en Zijne Autonome Machten ov Valentine Z !
(✿◠‿◠) ☆ \(^_^)/ ☆

Issues Thread Photography Stuff Project: Save F7. Stats Analysis

The Sixty! Valentian Stories! Gwen's Adventures!

• Never trouble trouble until trouble troubles you.
• World Map is a cat playing with Australia.
Let Fate sort it out.

User avatar
[violet]
Executive Director
 
Posts: 16205
Founded: Antiquity

Postby [violet] » Sun Nov 14, 2021 10:35 pm

Valentine Z wrote:That would explain why I have some small imperfections here and there when I use SVGs on the site. I have some decimal coordinates. Thanks for the information!

Yes, it will truncate to one or two decimal places in most cases, usually one.

User avatar
Minoa
Negotiator
 
Posts: 6072
Founded: Oct 05, 2011
Civil Rights Lovefest

Postby Minoa » Mon Nov 15, 2021 11:33 am

Trotterdam wrote:The default status does appear to be off. At least, mine is set to off even though I haven't explicitly done so, though it should be noted that I haven't changed my flag since this thing started.

I have to report that the default status is currently on for new nations (example: https://www.nationstates.net/nation=rockmusic). Again, I prefer that the default status is off for new nations as well.
Mme A. d'Oiseau, B.A. (State of Minoa)

User avatar
Refuge Isle
Technical Moderator
 
Posts: 1873
Founded: Dec 14, 2018
Left-wing Utopia

Postby Refuge Isle » Mon Nov 15, 2021 12:06 pm

Minoa wrote:
Trotterdam wrote:The default status does appear to be off. At least, mine is set to off even though I haven't explicitly done so, though it should be noted that I haven't changed my flag since this thing started.

I have to report that the default status is currently on for new nations (example: https://www.nationstates.net/nation=rockmusic). Again, I prefer that the default status is off for new nations as well.

Indeed. There are, as well, nations that select icon-style flags from our stock selection, such as the Pitcairn Islands, and found like this by default, which is rather unfortunate.

User avatar
Afsharid Persia
Lobbyist
 
Posts: 25
Founded: Dec 04, 2014
Inoffensive Centrist Democracy

Postby Afsharid Persia » Mon Nov 15, 2021 5:32 pm

[violet] wrote:
Afsharid Persia wrote:Here, I've screenshotted a zoomed in comparison so you can see: https://imgur.com/a/J47POkH

The top screenshot is what it looks like after it is set as my flag on NationStates.

The bottom screenshot is how it looks in the flag preview before submitting changes. This is how it's intended to look.

Thanks for the screenie. This is a result of compression. It can be particularly heavy on images that are designed to be small, because it limits the precision of co-ordinates. So if you have a 1000x1000 SVG image where all the co-ordinates are integers, those won't be modified, but if that same image is presented in a 20x20 viewbox with co-ordinates like 10.41259, they will be truncated, and you'll lose precision.


Do you or anyone else have any advice on how I can fix this on my end?

User avatar
Insidium
Bureaucrat
 
Posts: 43
Founded: Nov 10, 2021
Ex-Nation

Postby Insidium » Mon Nov 15, 2021 5:41 pm

Afsharid Persia wrote:
[violet] wrote:Thanks for the screenie. This is a result of compression. It can be particularly heavy on images that are designed to be small, because it limits the precision of co-ordinates. So if you have a 1000x1000 SVG image where all the co-ordinates are integers, those won't be modified, but if that same image is presented in a 20x20 viewbox with co-ordinates like 10.41259, they will be truncated, and you'll lose precision.

Do you or anyone else have any advice on how I can fix this on my end?

What software did you use to make the SVG version?
Last edited by Insidium on Mon Nov 15, 2021 5:43 pm, edited 3 times in total.

User avatar
Tinhampton
Postmaster-General
 
Posts: 13700
Founded: Oct 05, 2016
Civil Rights Lovefest

Postby Tinhampton » Tue Nov 16, 2021 8:21 am

Will the recent changes to the French flag be reflected in France.svg? I know that the blue on France.svg right now is darker than the blue on Europe.svg already
The Self-Administrative City of TINHAMPTON (pop. 329,537): Saffron Howard, Mayor (UCP); Alexander Smith, WA Delegate-Ambassador

Authorships & co-authorships: SC#250, SC#251, Issue #1115, SC#267, GA#484, GA#491, GA#533, GA#540, GA#549, SC#356, GA#559, GA#562, GA#567, GA#578, SC#374, GA#582, SC#375, GA#589, GA#590, SC#382, SC#385*, GA#597, GA#607, SC#415, GA#647, GA#656, GA#664, GA#671, GA#674, GA#675, GA#677, GA#680, Issue #1580, GA#682, GA#683, GA#684, GA#692, GA#693, GA#715
The rest of my CV: Cup of Harmony 73 champions; Philosopher-Queen of Sophia; *author of the most popular SC Res. ever; anti-NPO cabalist in good standing; 48yo Tory woman w/Asperger's; Cambridge graduate ~ currently reading The World by Simon Sebag Montefiore

User avatar
Merni
Ambassador
 
Posts: 1800
Founded: May 03, 2016
Democratic Socialists

Postby Merni » Tue Nov 16, 2021 9:04 pm

Tinhampton wrote:Will the recent changes to the French flag be reflected in France.svg? I know that the blue on France.svg right now is darker than the blue on Europe.svg already

It's not an official change by law or anything. There is no obligation on anyone (including state offices in France) to use any specific shade. As such I don't see why any change is required on NS. (See here)
2024: the year of democracy. Vote!
The Labyrinth | Donate your free time, help make free ebooks | Admins: Please let us block WACC TGs!
RIP Residency 3.5.16-18.11.21, killed by simplistic calculation
Political Compass: Economic -9.5 (Left) / Social -3.85 (Liberal)
Wrote issue 1523, GA resolutions 532 and 659
meth
When the people are being beaten with a stick, they are not much happier if it is called 'the People’s Stick.' — Mikhail Bakunin (to Karl Marx)
You're supposed to be employing the arts of diplomacy, not the ruddy great thumping sledgehammers of diplomacy. — Ardchoille
The West won the world not by the superiority of its ideas or values or religion [...] but rather by its superiority in applying organised violence. — Samuel P. Huntington (even he said that!)

User avatar
[violet]
Executive Director
 
Posts: 16205
Founded: Antiquity

Postby [violet] » Wed Nov 17, 2021 9:49 pm

Fixed France. I did update it earlier but don't think I got the colors quite right.

User avatar
Afsharid Persia
Lobbyist
 
Posts: 25
Founded: Dec 04, 2014
Inoffensive Centrist Democracy

Postby Afsharid Persia » Fri Nov 19, 2021 10:51 pm

Insidium wrote:
Afsharid Persia wrote:Do you or anyone else have any advice on how I can fix this on my end?

What software did you use to make the SVG version?


I used this website: https://www.pngtosvg.com/

User avatar
Porde
Attaché
 
Posts: 73
Founded: Mar 26, 2021
Ex-Nation

Postby Porde » Sun Nov 21, 2021 5:42 am

Why Pitcairn Islands flag is just coat of arms?

https://www.nationstates.net/images/fla ... slands.svg
Last edited by Porde on Sun Nov 21, 2021 5:45 am, edited 1 time in total.
tbh.
Azerbaijani, he/him, kind of incredibly weird (often cases)

User avatar
Durm
Attaché
 
Posts: 99
Founded: Jun 16, 2020
Psychotic Dictatorship

Postby Durm » Mon Nov 22, 2021 9:56 pm

Durm wrote:
Trotterdam wrote:The default status does appear to be off. At least, mine is set to off even though I haven't explicitly done so, though it should be noted that I haven't changed my flag since this thing started.

I think it only happened to the default (Australian Aboriginal) flag.

It is also on for at least one other flag: Cocos Islands.
Visoraxus Holoratus Starkiller

There is no good and evil, there is only evil, and those too good to be evil. Embrace malice or malice will be forced upon you. Peace was always a lie.

User avatar
[violet]
Executive Director
 
Posts: 16205
Founded: Antiquity

Postby [violet] » Wed Nov 24, 2021 7:19 pm

Porde wrote:Why Pitcairn Islands flag is just coat of arms?

https://www.nationstates.net/images/fla ... slands.svg

Because it looks AMAZING.

User avatar
The Republic of Western Sol
Diplomat
 
Posts: 837
Founded: Oct 13, 2021
Libertarian Police State

Postby The Republic of Western Sol » Fri Dec 24, 2021 6:41 am

Hey, I was wondering if someone could make a communist variation of my flag, you know, just in case...

User avatar
Ankuran
Chargé d'Affaires
 
Posts: 356
Founded: Jul 17, 2016
Liberal Democratic Socialists

Postby Ankuran » Fri Dec 24, 2021 2:27 pm

The Republic of Western Sol wrote:Hey, I was wondering if someone could make a communist variation of my flag, you know, just in case...


There's a thread for that.
<WARNING!!> Sleep [ ▋▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ▁ ]

<CRITICAL!!> F7 [ ▋▋▋▋▋▋▋▋▋▋]
Strength Through Unity | La force via l'union

████████████████

User avatar
Tinhampton
Postmaster-General
 
Posts: 13700
Founded: Oct 05, 2016
Civil Rights Lovefest

Postby Tinhampton » Fri Mar 18, 2022 8:41 am

I believe that the SVG flags of Norway and Sovereign Military Order of Malta do not properly display on nation pages. Witness, for example, Power and Allies 013 and Theempi.
The Self-Administrative City of TINHAMPTON (pop. 329,537): Saffron Howard, Mayor (UCP); Alexander Smith, WA Delegate-Ambassador

Authorships & co-authorships: SC#250, SC#251, Issue #1115, SC#267, GA#484, GA#491, GA#533, GA#540, GA#549, SC#356, GA#559, GA#562, GA#567, GA#578, SC#374, GA#582, SC#375, GA#589, GA#590, SC#382, SC#385*, GA#597, GA#607, SC#415, GA#647, GA#656, GA#664, GA#671, GA#674, GA#675, GA#677, GA#680, Issue #1580, GA#682, GA#683, GA#684, GA#692, GA#693, GA#715
The rest of my CV: Cup of Harmony 73 champions; Philosopher-Queen of Sophia; *author of the most popular SC Res. ever; anti-NPO cabalist in good standing; 48yo Tory woman w/Asperger's; Cambridge graduate ~ currently reading The World by Simon Sebag Montefiore

User avatar
Trotterdam
Postmaster-General
 
Posts: 10541
Founded: Jan 12, 2012
Left-Leaning College State

Postby Trotterdam » Fri Mar 18, 2022 10:54 am

Tinhampton wrote:I believe that the SVG flags of Norway and Sovereign Military Order of Malta do not properly display on nation pages. Witness, for example, Power and Allies 013 and Theempi.
They look correct to me, on all themes. What are you seeing?

User avatar
Tinhampton
Postmaster-General
 
Posts: 13700
Founded: Oct 05, 2016
Civil Rights Lovefest

Postby Tinhampton » Fri Mar 18, 2022 2:04 pm

Trotterdam wrote:
Tinhampton wrote:I believe that the SVG flags of Norway and Sovereign Military Order of Malta do not properly display on nation pages. Witness, for example, Power and Allies 013 and Theempi.
They look correct to me, on all themes. What are you seeing?

The SVG files failing to display next to the nation names (but, interestingly, not in the overview boxes) in Century theme.
The Self-Administrative City of TINHAMPTON (pop. 329,537): Saffron Howard, Mayor (UCP); Alexander Smith, WA Delegate-Ambassador

Authorships & co-authorships: SC#250, SC#251, Issue #1115, SC#267, GA#484, GA#491, GA#533, GA#540, GA#549, SC#356, GA#559, GA#562, GA#567, GA#578, SC#374, GA#582, SC#375, GA#589, GA#590, SC#382, SC#385*, GA#597, GA#607, SC#415, GA#647, GA#656, GA#664, GA#671, GA#674, GA#675, GA#677, GA#680, Issue #1580, GA#682, GA#683, GA#684, GA#692, GA#693, GA#715
The rest of my CV: Cup of Harmony 73 champions; Philosopher-Queen of Sophia; *author of the most popular SC Res. ever; anti-NPO cabalist in good standing; 48yo Tory woman w/Asperger's; Cambridge graduate ~ currently reading The World by Simon Sebag Montefiore

User avatar
United Calanworie
Technical Moderator
 
Posts: 3751
Founded: Dec 12, 2018
Democratic Socialists

Postby United Calanworie » Fri Mar 18, 2022 5:33 pm

Tinhampton wrote:I believe that the SVG flags of Norway and Sovereign Military Order of Malta do not properly display on nation pages. Witness, for example, Power and Allies 013 and Theempi.

Seconding this report. See, for example, https://century.nationstates.net/nation ... allies_013
Last edited by United Calanworie on Fri Mar 18, 2022 5:34 pm, edited 1 time in total.
Trans rights are human rights.
||||||||||||||||||||
Discord: Aav#7546 @queerlyfe
She/Her/Hers
My telegrams are not for Moderation enquiries, those belong in a GHR. Feel free to reach out if you want to just chat.

User avatar
Trotterdam
Postmaster-General
 
Posts: 10541
Founded: Jan 12, 2012
Left-Leaning College State

Postby Trotterdam » Sat Mar 19, 2022 4:06 am

Tinhampton wrote:The SVG files failing to display next to the nation names (but, interestingly, not in the overview boxes) in Century theme.
Oh, you're right! Now I see it.

I saw the flag still displaying in one place and assumed that's where the theme normally puts it, since I don't usually use that theme.

There's a very small black rectangle next to the nation name where the flag should go. Interestingly, if I right-click on it and do "View Image", I still get the correct picture. So it seems to be a matter of getting resized incorrectly.

Oddly, when I experiment with the flag in the overview box, I find that it actually gets rendered larger when the "max-height:100px" CSS code is enabled than when it is disabled, which seems to go against the concept of a max height.

Looking at the SVG file itself, it has a "viewBox" attribute but no "width" or "height" attribute, and therefore no canonical size. This seems likely to be the problem.

User avatar
Courelli
Attaché
 
Posts: 82
Founded: Apr 17, 2017
Left-Leaning College State

Postby Courelli » Tue Jun 21, 2022 1:40 pm

Hi again,

Just noticed that my SVG flag doesn't display on the nation settings page (https://www.nationstates.net/page=settings), though it displays everywhere else it should (as far as I can tell).

Also, are there any plans to support SVG region flags in the future? Apologies if this has already been asked.

EDIT: here is an image of what I see, on a Windows 10 PC running Google Chrome and NS default theme: https://i.imgur.com/bbIiwQB.png
Last edited by Courelli on Tue Jun 21, 2022 1:44 pm, edited 1 time in total.
Governor: Paolo Argentieri
Prime Minister: Elisabetta Di Martino
FA Minister: Emiliano Marsicano
WA Representative: Alessandra Borgese
THE REPUBLIC OF COURELLI
Pronouns: he/him
Discord: @courelli

recall how often in human history the saint and the rebel have been the same person

12th, 15th, 18th, & 23rd Delegate of The Social Liberal Union | Administrator of NSLeft | Co-Author of GA #459 | Co-Author of Issue 1558

Anaaxes wrote:imagine explaining to an alien child the concept of a birthday party fully hosted by Chuck E. Cheese himself, they would be mortified of our rituals

User avatar
Tinhampton
Postmaster-General
 
Posts: 13700
Founded: Oct 05, 2016
Civil Rights Lovefest

Postby Tinhampton » Sat Jun 25, 2022 9:03 am

The SVG flag of Haku appears to be borked. It makes the nominee section of the SC page right now linesplit.
The Self-Administrative City of TINHAMPTON (pop. 329,537): Saffron Howard, Mayor (UCP); Alexander Smith, WA Delegate-Ambassador

Authorships & co-authorships: SC#250, SC#251, Issue #1115, SC#267, GA#484, GA#491, GA#533, GA#540, GA#549, SC#356, GA#559, GA#562, GA#567, GA#578, SC#374, GA#582, SC#375, GA#589, GA#590, SC#382, SC#385*, GA#597, GA#607, SC#415, GA#647, GA#656, GA#664, GA#671, GA#674, GA#675, GA#677, GA#680, Issue #1580, GA#682, GA#683, GA#684, GA#692, GA#693, GA#715
The rest of my CV: Cup of Harmony 73 champions; Philosopher-Queen of Sophia; *author of the most popular SC Res. ever; anti-NPO cabalist in good standing; 48yo Tory woman w/Asperger's; Cambridge graduate ~ currently reading The World by Simon Sebag Montefiore

User avatar
Trotterdam
Postmaster-General
 
Posts: 10541
Founded: Jan 12, 2012
Left-Leaning College State

Postby Trotterdam » Sat Jun 25, 2022 10:08 am

It seems to be an issue with how the "max-width"/"max-height" CSS properties are interpreted. Antiquity, which uses "width" and "height" instead, doesn't have the issue, and when I patch in explicit "width"/"height" properties into Century, the problem disappears.

As for why this one SVG file in particular has the problem when other flags seem to be fine, I'm not sure, but a cursory examination made me notice the suspicious fact that the SVG file has a "viewBox" but no "width" or "height".

PreviousNext

Advertisement

Remove ads

Return to Technical

Who is online

Users browsing this forum: 9003, Agrocragoria, Bagong Timog Mindanao, Cagadia, Claraxia, Denoidumbutoniurucwivobrs, Inferior, Katrzynija, Mavorgon, Micro Gettysburg, Neuberlin, Redtapestan, Schardonia, Torregal, Unionised States, Wangano

Advertisement

Remove ads