NATION

PASSWORD

nation flags rendered JPG

Bug reports, general help, ideas for improvements, and questions about how things are meant to work.
User avatar
Imagey Nation
Senator
 
Posts: 3802
Founded: Jun 16, 2009
Left-wing Utopia

nation flags rendered JPG

Postby Imagey Nation » Thu Mar 08, 2012 4:01 pm

Realize aim to reduce size in KB for cost containment and display speed.
However, JPG is bad format for flag.
Flags submitted as PNG are reformatted as JPG, corrupting image.

Probable cause is "The server now attempts to resize flags to fit within 214x142 pixels, and generate thumbnails.
Both height and width must fit, so if your image is perfectly square, it will wind up as 142x142.
It will reformat as both PNG and JPEG and store it as whichever one is smaller (in terms of filesize)." (Violet, Sun Mar 06, 2011)
Since file size of PNG affectd by number of colours and file size of JPG by "quality" setting, JPG always less than PNG.

At NS size above, difference of KB size JPG or PNG = 1 to 3 KB.
If is not needed difference, might PNG be preferred format?
Please advise. Thank you.
God bless you always, all ways,
Otkyas at Kelmo

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

Postby [violet] » Thu Mar 08, 2012 7:14 pm

Okay, I've made a few changes!

Firstly, as requested, the game will no longer store images as whichever is smaller, PNG or JPEG. Instead, it will use PNG so long as it's under 50KB. That is, you'll only be converted to JPEG version if the PNG version can't fit under 50KB and the JPEG one can.

Secondly, the 12KB loopholes are now 50KB loopholes. That is, images will not be rescaled at all if they're under 50KB and fit within 428x284 or 107x426.

Thirdly, the server will attempt to rescale at 321x213 before it tries 214x142.

To summarize: uploaded images for nation flags are left alone if they fit within a 428x284 box, are PNG or JPEG format, and weigh less than 50KB. If you make nation flags, this would be your ideal, I'd imagine.

Two other ways to avoid rescaling: images that fit within 107x 71 and weigh less than 50KB, regardless of format (e.g. a small animated GIF), and PNG or JPEG images that fit within 107x426 (e.g. a tall skinny flag) and weigh less than 50KB.

If you upload an image that doesn't meet these requirements, the game will try to rescale it. It will try three successive rescales: at 321x213, at 214x142, and at 107x 71. Each time, if the resulting rescaled image weighs less than 50KB in PNG format, or, failing that, JPEG format, that's what you get.

Note that the maximum dimensions of 428x284 are available only to those who design their image accordingly. If the game has to rescale your image, it will be no larger than 321x213. This is because I figure that people who take the time to tailor their image are probably doing better things with the space.

User avatar
Astrolinium
Post Czar
 
Posts: 36603
Founded: Mar 05, 2011
Ex-Nation

Postby Astrolinium » Thu Mar 08, 2012 7:48 pm

[violet] wrote:the 12KB loopholes are now 50KB loopholes. That is, images will


:o
:hug:
The Sublime Island Kingdom of Astrolinium
Ilia Franchisco Attore, King Attorio Maldive III
North Carolina | NSIndex Page | Embassies
Pop: 3,082 | Tech: MT | DEFCON: 5-4-3-2-1
SEE YOU SPACE COWBOY...
About Me: Ravenclaw, Gay, Cis Male, 5’4”.
"Don't you forget about me."

Ex-Delegate of Ankh Mauta | NSG Sodomy Club
Minor Acolyte of the Vast Jewlluminati Conspiracy™

User avatar
Todd McCloud
Senator
 
Posts: 4088
Founded: Oct 11, 2006
Left-Leaning College State

Postby Todd McCloud » Thu Mar 08, 2012 9:00 pm

Very good! I like how higher kb's won't result in changing the flag dimensions!
"Your uniform doesn't seem to fit. You're much too alive in it."

"You must be the change you want to see in the world" - Gandhi
"The worst prison would be a closed heart." - Pope John Paul II

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

Postby Mousebumples » Thu Mar 08, 2012 9:26 pm

And, of course, I just uploaded a new flag to a puppet that was resized earlier today. I'll have to reupload now, since it shouldn't be resized under the new guidelines.

Thanks, [violet]! :bow:
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
Nistertal
Secretary
 
Posts: 35
Founded: Mar 06, 2008
Ex-Nation

Postby Nistertal » Fri Mar 09, 2012 5:07 am

I just tried it. Looks wonderful :)
Thank you!
In need of a new flag? Visit the F L A G | C R A F T E R S' | G U I L D

User avatar
Castle in the Sky
Political Columnist
 
Posts: 5
Founded: Sep 03, 2006
Ex-Nation

Postby Castle in the Sky » Fri Mar 09, 2012 5:59 am

[violet] wrote:under 50KB and fit within 428x284 or 107x426.

Yay! Thank you.

User avatar
Glen-Rhodes
Powerbroker
 
Posts: 9027
Founded: Jun 25, 2008
Ex-Nation

Postby Glen-Rhodes » Fri Mar 09, 2012 8:58 am

Just wondering, would you ever consider allowing SVG format?

User avatar
Werben
Civil Servant
 
Posts: 6
Founded: Jun 24, 2011
Ex-Nation

Postby Werben » Fri Mar 09, 2012 9:35 am

You know, I sort of like this new update now. My flag was condensed before I CTE'd, but now when I placed it back on it's now much larger!
THIS...IS...WERBEN!!!

User avatar
Imagey Nation
Senator
 
Posts: 3802
Founded: Jun 16, 2009
Left-wing Utopia

Postby Imagey Nation » Fri Mar 09, 2012 4:29 pm

[violet] wrote:Okay, I've made a few changes!
...
Note that the maximum dimensions of 428x284 are available only to those who design their image accordingly. If the game has to rescale your image, it will be no larger than 321x213. This is because I figure that people who take the time to tailor their image are probably doing better things with the space.

Thank you, [violet], for this.
God bless you always, all ways,
Otkyas at Kelmo

User avatar
Tim-Opolis
Negotiator
 
Posts: 6198
Founded: Feb 17, 2010
Iron Fist Consumerists

Postby Tim-Opolis » Sat Mar 10, 2012 3:42 pm

Thanks [violet] :hug:
Want to be a hero? Join The Grey Wardens - Help Us Save Nationstates
( ͡° ͜ʖ ͡°) Commended by Security Council Resolution #420 ( ͡° ͜ʖ ͡°)

Author of SC#74, SC #203, SC #222, and SC #238 | Co-Author of SC#191
Founder of Spiritus | Three-Time Delegate of Osiris | Pharaoh of the Islamic Republics of Iran | Hero of Greece
<Koth - 06/30/2020> I mean as far as GPers go, Tim is one of the most iconic

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

Postby [violet] » Sat Mar 10, 2012 3:49 pm

Glen-Rhodes wrote:Just wondering, would you ever consider allowing SVG format?

Yes, but I'd want to think there was a good usage case for it.

User avatar
Astrolinium
Post Czar
 
Posts: 36603
Founded: Mar 05, 2011
Ex-Nation

Postby Astrolinium » Sat Mar 10, 2012 3:51 pm

[violet] wrote:
Glen-Rhodes wrote:Just wondering, would you ever consider allowing SVG format?

Yes, but I'd want to think there was a good usage case for it.


If I'm not mistaken, SVGs use code to render the specifics of an image so that it displays similarly at all sizes, does it not?
Would that not mean SVG would (potentially, depending on implementation) help eliminate distortion when the flag is shrunk for use on the forum?
The Sublime Island Kingdom of Astrolinium
Ilia Franchisco Attore, King Attorio Maldive III
North Carolina | NSIndex Page | Embassies
Pop: 3,082 | Tech: MT | DEFCON: 5-4-3-2-1
SEE YOU SPACE COWBOY...
About Me: Ravenclaw, Gay, Cis Male, 5’4”.
"Don't you forget about me."

Ex-Delegate of Ankh Mauta | NSG Sodomy Club
Minor Acolyte of the Vast Jewlluminati Conspiracy™

User avatar
Flibbleites
Retired Moderator
 
Posts: 6569
Founded: Jan 02, 2004
Ex-Nation

Postby Flibbleites » Sat Mar 10, 2012 5:28 pm

Astrolinium wrote:
[violet] wrote:Yes, but I'd want to think there was a good usage case for it.


If I'm not mistaken, SVGs use code to render the specifics of an image so that it displays similarly at all sizes, does it not?
Would that not mean SVG would (potentially, depending on implementation) help eliminate distortion when the flag is shrunk for use on the forum?

Wasn't there a problem with SVGs where certain mobile browsers refused to display them? I seem to remember people complaining about not being able to see the graphs because of that.

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

Postby [violet] » Sat Mar 10, 2012 6:23 pm

Astrolinium wrote:If I'm not mistaken, SVGs use code to render the specifics of an image so that it displays similarly at all sizes, does it not?
Would that not mean SVG would (potentially, depending on implementation) help eliminate distortion when the flag is shrunk for use on the forum?

That is true, yes.

Flibbleites wrote:Wasn't there a problem with SVGs where certain mobile browsers refused to display them? I seem to remember people complaining about not being able to see the graphs because of that.

Ah yes, the Android browser.

User avatar
Snefaldia
Diplomat
 
Posts: 782
Founded: Dec 05, 2006
Father Knows Best State

Postby Snefaldia » Mon Mar 12, 2012 10:02 pm

[violet], this is the best! I was shaking my fist at the screen a few months ago when my shiny new GIMPed flag had to be downsized as a JPEG, and now everything looks great!

SVG format would be nifty as well, but this is a great addition!
Welcome to Snefaldia!
Also the player behind: Kartlis & Sabaristan

User avatar
Uni
Civil Servant
 
Posts: 8
Founded: Oct 07, 2011
Ex-Nation

Postby Uni » Mon Mar 12, 2012 10:15 pm

Snefaldia wrote:[violet], this is the best! I was shaking my fist at the screen a few months ago when my shiny new GIMPed flag had to be downsized as a JPEG, and now everything looks great!

SVG format would be nifty as well, but this is a great addition!


Oooow, I like that Snefaldia, although your dark rich maroon was pretty classic.

User avatar
Sanctaria
Powerbroker
 
Posts: 7922
Founded: Sep 12, 2008
Inoffensive Centrist Democracy

Postby Sanctaria » Mon Mar 12, 2012 10:32 pm

This is great, thanks [violet].
Divine Federation of Sanctaria

Ideological Bulwark #258

Dr. Bethany Greer CMD, Sanctarian Ambassador to the World Assembly
Author of:
GA#109 GA#133 GA#176 GA#201 GA#222 GA#297
GA#590 (Co)
Frisbeeteria wrote:Do people not realize that moderators can tell when someone is wanking?

Luna Amore wrote:Sanc is always watching. Ever vigilant.

Auralia wrote:Your condescending attitude is remarkably annoying.


Advertisement

Remove ads

Return to Technical

Who is online

Users browsing this forum: Grishahakkaverchynot, Merethin, Orcland, Res Publica Galactica, Trotterdam

Advertisement

Remove ads