NATION

PASSWORD

New custom flag auto-resizing

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

Advertisement

Remove ads

User avatar
Mousebumples
Game Moderator
 
Posts: 8623
Founded: Antiquity
Inoffensive Centrist Democracy

Postby Mousebumples » Sat Mar 26, 2011 8:35 pm

Aurora-Nova wrote:Unfortunately not. Most of these flags were just over 12kB, and were able to be brought under either by resizing just slightly smaller, or using pngcrush.

Can you upload these flags somewhere? It's difficult to speculate on what the problem is when we don't know (A) the file size of the flags in question or (B) the dimensions of the flags in question.
Leader of the Mouse-a-rific Mousetastic Moderator Mousedom of Mousebumples
Past WA Delegate for Europeia & Monkey Island
Proud Member of UNOG
I'm an "adorably marvelous NatSov" - Mallorea and Riva
GA Resolutions (sorted by category) | Why Repeal? | Reppy's Sig Workshop

User avatar
Aurora-Nova
Diplomat
 
Posts: 759
Founded: Mar 14, 2011
Ex-Nation

Postby Aurora-Nova » Sat Mar 26, 2011 9:48 pm

Mousebumples wrote:
Aurora-Nova wrote:Unfortunately not. Most of these flags were just over 12kB, and were able to be brought under either by resizing just slightly smaller, or using pngcrush.

Can you upload these flags somewhere? It's difficult to speculate on what the problem is when we don't know (A) the file size of the flags in question or (B) the dimensions of the flags in question.

Certainly. The flags I initially attempted to upload, both just over 12kB and within the size limit, are here and here. I subsequently attempted uploading ones at slightly smaller dimensions, in case the 214x142px limit was exclusive rather than inclusive, and the same thing happened. I apologize for this trouble; I'm just trying my best to understand what might be the cause of this, when I've not encountered any similar problem before.
As we speak, the Libyan people are being
massacred by terrorists in arms against the
legitimate government. The elderly, women,
children... everyone in Libya is in danger tonight.
Help raise awareness and support Gaddafi!
“I believe that Palestine is an occupied land
from the Mediterranean Sea to the Jordan River,
and this is the right of the entire
Palestinian people, this land.”

~Sayyid Hassan Nasrallah
Union of Aurora Nova | Union d'Aurore-Neuve
Deus Imperatorque Populusque
A Mari Usque Ad Mare

-------------------------
Anti-Israel · Anti-USA · Pro-Hamas · Pro-Hezbollah · Pro-Gaddafi · Pro-DPRK
-------------------------
My views are often radical, and may offend some people.
Be aware that I will always speak my truly-held beliefs, however offensive or unpopular they may be to others.

User avatar
Mousebumples
Game Moderator
 
Posts: 8623
Founded: Antiquity
Inoffensive Centrist Democracy

Postby Mousebumples » Sun Mar 27, 2011 6:16 am

Aurora-Nova wrote:Certainly. The flags I initially attempted to upload, both just over 12kB and within the size limit, are here and here. I subsequently attempted uploading ones at slightly smaller dimensions, in case the 214x142px limit was exclusive rather than inclusive, and the same thing happened. I apologize for this trouble; I'm just trying my best to understand what might be the cause of this, when I've not encountered any similar problem before.

Per the loopholes listed by [violet] .... the ONLY way to avoid resizing is by having flags that are less than 12KB and within the size requirements.

It appears that your size requirements are fine, but the flags are not under 12KB. That would be the problem, best as I can see.
Leader of the Mouse-a-rific Mousetastic Moderator Mousedom of Mousebumples
Past WA Delegate for Europeia & Monkey Island
Proud Member of UNOG
I'm an "adorably marvelous NatSov" - Mallorea and Riva
GA Resolutions (sorted by category) | Why Repeal? | Reppy's Sig Workshop

User avatar
Corusant Sphere
Chargé d'Affaires
 
Posts: 419
Founded: May 03, 2010
Ex-Nation

Postby Corusant Sphere » Sun Mar 27, 2011 12:44 pm

I hate the flag's auto-resizing, all my test (nice) flags are not under 12KB (even 50KB) and despite of the new bigger limit for flag's size, mentioned in the News Page, all flags are small - because of resizing :(
Last edited by Corusant Sphere on Sun Mar 27, 2011 1:04 pm, edited 1 time in total.

User avatar
Esternial
Retired Moderator
 
Posts: 54394
Founded: May 09, 2009
Inoffensive Centrist Democracy

Postby Esternial » Sun Mar 27, 2011 1:02 pm

Nice work, [voilet] *thumbs up*

Bet this'll rid the flag-makers from a lot of "resizing requests"

User avatar
Aurora-Nova
Diplomat
 
Posts: 759
Founded: Mar 14, 2011
Ex-Nation

Postby Aurora-Nova » Sun Mar 27, 2011 2:09 pm

Mousebumples wrote:
Aurora-Nova wrote:Certainly. The flags I initially attempted to upload, both just over 12kB and within the size limit, are here and here. I subsequently attempted uploading ones at slightly smaller dimensions, in case the 214x142px limit was exclusive rather than inclusive, and the same thing happened. I apologize for this trouble; I'm just trying my best to understand what might be the cause of this, when I've not encountered any similar problem before.

Per the loopholes listed by [violet] .... the ONLY way to avoid resizing is by having flags that are less than 12KB and within the size requirements.

It appears that your size requirements are fine, but the flags are not under 12KB. That would be the problem, best as I can see.

Hmm... I guess it was just a contradiction of interpretation - I figured it would resize them, but only to within those size requirements, since it said that "the server now attempts to resize flags to fit within 214x142 pixels". Oh well, sorry for the fuss. :meh:
As we speak, the Libyan people are being
massacred by terrorists in arms against the
legitimate government. The elderly, women,
children... everyone in Libya is in danger tonight.
Help raise awareness and support Gaddafi!
“I believe that Palestine is an occupied land
from the Mediterranean Sea to the Jordan River,
and this is the right of the entire
Palestinian people, this land.”

~Sayyid Hassan Nasrallah
Union of Aurora Nova | Union d'Aurore-Neuve
Deus Imperatorque Populusque
A Mari Usque Ad Mare

-------------------------
Anti-Israel · Anti-USA · Pro-Hamas · Pro-Hezbollah · Pro-Gaddafi · Pro-DPRK
-------------------------
My views are often radical, and may offend some people.
Be aware that I will always speak my truly-held beliefs, however offensive or unpopular they may be to others.

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

Postby [violet] » Sun Mar 27, 2011 4:21 pm

Aurora-Nova wrote:But the servers should not attempt to resize my flag to 107px wide, should it? My flag was within the 214x142px limit and under 250kB. Why would it resize it to 107px wide if it's already within the 214x142px limit?


Fixed. A bug was resizing flags to 107x126 if they were in a particular size window, regardless of file size.

The only reason your flag should have been resized in those circumstances is if it were over 50kB, which it wasn't.

User avatar
Aurora-Nova
Diplomat
 
Posts: 759
Founded: Mar 14, 2011
Ex-Nation

Postby Aurora-Nova » Sun Mar 27, 2011 4:50 pm

[violet] wrote:
Aurora-Nova wrote:But the servers should not attempt to resize my flag to 107px wide, should it? My flag was within the 214x142px limit and under 250kB. Why would it resize it to 107px wide if it's already within the 214x142px limit?


Fixed. A bug was resizing flags to 107x126 if they were in a particular size window, regardless of file size.

The only reason your flag should have been resized in those circumstances is if it were over 50kB, which it wasn't.

That's what I thought. Thanks! Image
As we speak, the Libyan people are being
massacred by terrorists in arms against the
legitimate government. The elderly, women,
children... everyone in Libya is in danger tonight.
Help raise awareness and support Gaddafi!
“I believe that Palestine is an occupied land
from the Mediterranean Sea to the Jordan River,
and this is the right of the entire
Palestinian people, this land.”

~Sayyid Hassan Nasrallah
Union of Aurora Nova | Union d'Aurore-Neuve
Deus Imperatorque Populusque
A Mari Usque Ad Mare

-------------------------
Anti-Israel · Anti-USA · Pro-Hamas · Pro-Hezbollah · Pro-Gaddafi · Pro-DPRK
-------------------------
My views are often radical, and may offend some people.
Be aware that I will always speak my truly-held beliefs, however offensive or unpopular they may be to others.

User avatar
Sirain
Spokesperson
 
Posts: 129
Founded: Sep 04, 2010
Ex-Nation

Postby Sirain » Wed Mar 30, 2011 10:22 pm

My flag looked perfect before, but now, this makes it smaller and blurry. Is there any way I can restore it to the perfect quality it was at before?

Before
Image

After
Image
Map of Sirain
Baptism of Fire 41: Round of 16
Copa Rushmori IV Participant

User avatar
Aurora-Nova
Diplomat
 
Posts: 759
Founded: Mar 14, 2011
Ex-Nation

Postby Aurora-Nova » Wed Mar 30, 2011 10:52 pm

Sirain wrote:Is there any way I can restore it to the perfect quality it was at before?

While it's highly unlikely the administration will restore it, you should be able to get a slightly smaller version of the same sharpness by uploading this image as-is.

Image
As we speak, the Libyan people are being
massacred by terrorists in arms against the
legitimate government. The elderly, women,
children... everyone in Libya is in danger tonight.
Help raise awareness and support Gaddafi!
“I believe that Palestine is an occupied land
from the Mediterranean Sea to the Jordan River,
and this is the right of the entire
Palestinian people, this land.”

~Sayyid Hassan Nasrallah
Union of Aurora Nova | Union d'Aurore-Neuve
Deus Imperatorque Populusque
A Mari Usque Ad Mare

-------------------------
Anti-Israel · Anti-USA · Pro-Hamas · Pro-Hezbollah · Pro-Gaddafi · Pro-DPRK
-------------------------
My views are often radical, and may offend some people.
Be aware that I will always speak my truly-held beliefs, however offensive or unpopular they may be to others.

User avatar
Sirain
Spokesperson
 
Posts: 129
Founded: Sep 04, 2010
Ex-Nation

Postby Sirain » Thu Mar 31, 2011 2:22 pm

Thanks!
Map of Sirain
Baptism of Fire 41: Round of 16
Copa Rushmori IV Participant

User avatar
Orthaethaczil
Chargé d'Affaires
 
Posts: 399
Founded: Jul 06, 2010
Ex-Nation

Postby Orthaethaczil » Fri Apr 08, 2011 12:27 am

I dont get it ... I uploaded my flag in the new 214x142 format, and yet he insisted on converting my beautiful png into an ugly jpg ?

Its still looking OK in the full version, but the icons are ugly now.

My png is just 16kb ... not that huge really. :(
Be fruitful and multiply.

User avatar
Ballotonia
Senior Admin
 
Posts: 5494
Founded: Antiquity
Liberal Democratic Socialists

Postby Ballotonia » Fri Apr 08, 2011 2:35 am

Orthaethaczil wrote:I dont get it ... I uploaded my flag in the new 214x142 format, and yet he insisted on converting my beautiful png into an ugly jpg ?

Its still looking OK in the full version, but the icons are ugly now.

My png is just 16kb ... not that huge really. :(


See: viewtopic.php?p=4968912#p4968912
"Note that thumbnails are generated no matter what."

That's to get a page like Markanite load reasonably fast.

Ballotonia
"Een volk dat voor tirannen zwicht zal meer dan lijf en goed verliezen, dan dooft het licht…" -- H.M. van Randwijk

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

Postby [violet] » Fri Apr 08, 2011 11:49 pm

Orthaethaczil wrote:I dont get it ... I uploaded my flag in the new 214x142 format, and yet he insisted on converting my beautiful png into an ugly jpg ?

Its still looking OK in the full version, but the icons are ugly now.

My png is just 16kb ... not that huge really. :(

The JPEG version is 9.6KB, and while you're right that 16KB isn't much, a 40% saving adds up to a lot give we're dealing with tens of thousands of flags.

The thumbnails are compressed more aggressively than the large flag, on the assumption that it's pretty hard to make out detail at that size anyway. But maybe we're being too aggressive. Can you upload your original image somewhere? I'll compare a few different compression values.

User avatar
Aurora-Nova
Diplomat
 
Posts: 759
Founded: Mar 14, 2011
Ex-Nation

Postby Aurora-Nova » Sat Apr 09, 2011 1:02 pm

[violet] wrote:The JPEG version is 9.6KB, and while you're right that 16KB isn't much, a 40% saving adds up to a lot give we're dealing with tens of thousands of flags.

If I may make a suggestion, both to you and to people who have this issue with PNG flags just over 12kB, you might consider using pngcrush on images. While I'm no developer, if NationStates is running on a *nix server, it should be simple enough to integrate into the existing compression mechanism, and can often bring files under the limit without reducing quality. On the user-end, it can be obtained for *nix and Windows platforms (possibly others as well), so people could try using it before uploading. Just my two cents on the issue, as a rabid JPEG hater.
As we speak, the Libyan people are being
massacred by terrorists in arms against the
legitimate government. The elderly, women,
children... everyone in Libya is in danger tonight.
Help raise awareness and support Gaddafi!
“I believe that Palestine is an occupied land
from the Mediterranean Sea to the Jordan River,
and this is the right of the entire
Palestinian people, this land.”

~Sayyid Hassan Nasrallah
Union of Aurora Nova | Union d'Aurore-Neuve
Deus Imperatorque Populusque
A Mari Usque Ad Mare

-------------------------
Anti-Israel · Anti-USA · Pro-Hamas · Pro-Hezbollah · Pro-Gaddafi · Pro-DPRK
-------------------------
My views are often radical, and may offend some people.
Be aware that I will always speak my truly-held beliefs, however offensive or unpopular they may be to others.

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

Postby [violet] » Sun Apr 10, 2011 6:47 pm

We use pngcrush for static images, but it's extremely computationally intensive to use dynamically.

User avatar
Ethel mermania
Post Overlord
 
Posts: 129553
Founded: Aug 20, 2010
Father Knows Best State

Postby Ethel mermania » Fri Sep 16, 2011 4:21 am

< brings plate of cookies to the coders.

Any chance of making animated gifs work again on the rmb's?
https://www.hvst.com/posts/the-clash-of ... s-wl2TQBpY

The West won the world not by the superiority of its ideas or values or religion … but rather by its superiority in applying organized violence. Westerners often forget this fact; non-Westerners never do.
--S. Huntington

The most fundamental problem of politics is not the control of wickedness but the limitation of righteousness. 

--H. Kissenger

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

Postby [violet] » Sun Sep 18, 2011 6:13 pm

Nope.

The RMB uses thumbnails; your flag would be unreadable there even if it were animated.

User avatar
Ethel mermania
Post Overlord
 
Posts: 129553
Founded: Aug 20, 2010
Father Knows Best State

Postby Ethel mermania » Sun Sep 18, 2011 6:55 pm

[violet] wrote:Nope.

The RMB uses thumbnails; your flag would be unreadable there even if it were animated.



Darn,

< brings milk for cookies


it use to work on the RMB, but thank you for the answer,
https://www.hvst.com/posts/the-clash-of ... s-wl2TQBpY

The West won the world not by the superiority of its ideas or values or religion … but rather by its superiority in applying organized violence. Westerners often forget this fact; non-Westerners never do.
--S. Huntington

The most fundamental problem of politics is not the control of wickedness but the limitation of righteousness. 

--H. Kissenger

User avatar
Orasad
Civilian
 
Posts: 1
Founded: Apr 01, 2019
Ex-Nation

Postby Orasad » Fri May 14, 2021 3:15 pm

can anybody tell me; what is the flag original size as if in the selection box (the real life flag in nationstate)
please sombody help me with the formula, i already changing flags 3x today, my people about to go crazy any minute now

User avatar
The Finntopian Empire
Envoy
 
Posts: 279
Founded: Jun 06, 2020
Left-Leaning College State

Postby The Finntopian Empire » Wed Feb 23, 2022 5:12 pm

I know this is kind of gravedigging, but I was told to go here, can I use WEBM files as well as GIF? and is there different size/resolution requirements?

User avatar
PhilTech
Diplomat
 
Posts: 807
Founded: Sep 29, 2020
Capitalist Paradise

Postby PhilTech » Wed Feb 23, 2022 10:00 pm

The Finntopian Empire wrote:I know this is kind of gravedigging, but I was told to go here, can I use WEBM files as well as GIF? and is there different size/resolution requirements?

To the best of my knowledge, you can't use WEBM files. You can use GIF flags though. As an example, mine is a GIF flag.

This is the latest flag rules we have.

Since you might get too lazy reading the Opening Post (OP), I'll read it for you :)

[violet] wrote:Animated GIFs are possible if the filesize is under 150kB and the image fits within 321x213 pixels. So you can have a small animated GIF so long as the filesize isn't too big. In this case, the animation will only run on your nation's home page.

User avatar
The Finntopian Empire
Envoy
 
Posts: 279
Founded: Jun 06, 2020
Left-Leaning College State

Postby The Finntopian Empire » Thu Feb 24, 2022 7:16 am

PhilTech wrote:
The Finntopian Empire wrote:I know this is kind of gravedigging, but I was told to go here, can I use WEBM files as well as GIF? and is there different size/resolution requirements?

To the best of my knowledge, you can't use WEBM files. You can use GIF flags though. As an example, mine is a GIF flag.

This is the latest flag rules we have.

Since you might get too lazy reading the Opening Post (OP), I'll read it for you :)

[violet] wrote:Animated GIFs are possible if the filesize is under 150kB and the image fits within 321x213 pixels. So you can have a small animated GIF so long as the filesize isn't too big. In this case, the animation will only run on your nation's home page.

thank you very much!

Previous

Advertisement

Remove ads

Return to Technical

Who is online

Users browsing this forum: Card Cleaver, Khantin, Kyallisar, Lipnitia2, North American Imperial State, Riemstagrad, Stefrajinsk, The Rancid Host, The Southern Dependencies, The Two Jerseys

Advertisement

Remove ads