NationStates Jolt Archive


Flag Parsing

Tiago Silva
10-10-2007, 15:00
Your flag must be:
1. in JPEG (.jpg) format
2. about 107x71 pixels in size
3. no larger than 10KB
4. appropriate. This means conforming to site etiquette and being suitably flag-like. Images likely to cause widespread offense (e.g. nudity, swastikas) are prohibited, and your nation may be deleted if you post them.


I'm pretty sure that 1 to 3 can be parsed out with some routine (I don't know what you use in the back end, maybe Perl, since that's what Max uses in his website...).
1 is tricky: I don't know what are you talking about. File extensions, (several) file formats?
There are many people that use (animated!) gif/bmp/apng (lol) graphics with a .jpg extension.
And some with *huge* images.

4 is, of course, manually checked, if the file doesn't fall back in those three checks.

Maybe I'm crazy, but that's how it should be done.
Frisbeeteria
10-10-2007, 18:59
This one's gonna take an admin to answer

We stopped enforcing this one a long time ago, though we'll send a warning (and delete the flag) if it's a whole lot bigger than 300x200. Yeah, I know we should update the text, but it just hasn't been a priority.

I'm pretty sure this one is enforced programmatically.

Yep. Manual process, dependent largely on player reportage via Getting Help. If you've got a nice small applet that analyzes image content and tags the porn and swastikas for mod attention, I'm sure we'd love to hear about it.
Stoklomolvi
11-10-2007, 06:35
Would a flag that is 350×175 be okay?
The Most Glorious Hack
11-10-2007, 07:07
Probably would be better if it's smaller.
Vojvodina-Nihon
11-10-2007, 18:50
Personally, I have uploaded .png and .gif images as NationStates flags in the past; and it works, provided the images are less than 10 KB in size. So I assume the requirement for .jpg is an anachronism left over from the 6 KB era when any other file format would be too large to upload anyway (unless it was a really small and non-detailed image).
SalusaSecondus
14-10-2007, 23:24
JPEG and GIF both work very well. PNG isn't quite as good (less universal support).

I could programmatically enforce it, but it hasn't been worth my time.
Shinobi Villages
15-10-2007, 11:15
Can I add a Coat of arms?
Itinerate Tree Dweller
16-10-2007, 08:50
You could probably use a coat of arms instead of a flag, as long as it meets the requirements. I am not a mod.
Eurozonia
16-10-2007, 16:09
i cant seem to create an image that small.
I'm using photoshop CS
Should I be using something else?
Please help.
Tsaraine
16-10-2007, 16:50
Some nations - Portugal is an example in the real world - have their coat of arms as part of their flag. There's no reason you couldn't do that.

Eurozonia; try using "Save to Web" instead of plain "Save". In "Save to Web" you can alter the quality (if it's a .jpg) or the number of colours (if it's a .gif - particularly suitable for flags, which usually contain large areas of flat colour). If you mean the size in pixels, go to "Image Size" and you can scale it down.

I use Photoshop CS2 to prepare all my flags for the web, so it is certainly possible to do.

~ Tsar the Mod.
Tiago Silva
01-11-2007, 12:01
This one's gonna take an admin to answer
We stopped enforcing this one a long time ago, though we'll send a warning (and delete the flag) if it's a whole lot bigger than 300x200. Yeah, I know we should update the text, but it just hasn't been a priority.
I'm pretty sure this one is enforced programatically.
Yep. Manual process, dependent largely on player reportage via Getting Help. If you've got a nice small applet that analyzes image content and tags the porn and swastikas for mod attention, I'm sure we'd love to hear about it.


That's why I came here. ;) What exactly is supported?
Bad choice. Really really bad one. That's what I would have said years ago. Before the modern standards, and the accessible/mobile web.
Some people use their phones to browse NS. Some mobile browsers pre-process the requests and resize/compress while others don't... but that's not really a solution. The user must be able to access NS everywhere, with no nuisance, and all under the standards.
And that's very good.
Lazy mods! (lol) There's no way to to dodge this. Every input should be parsed by humans. Yes, there are applets/programs/methods to detect sprites (don't know if my translation is correct) and figures, but it's not fool/fullproof and ultimately, every image should be parsed by humans.


JPEG and GIF both work very well. PNG isn't quite as good (less universal support).
Can you explain that claim? I find it very debatable. Unless you're speaking of something different.
The Most Glorious Hack
01-11-2007, 12:37
Some people use their phones to browse NS.Seems to me that if you're surfing with a non-standard device, you must accept a certain level of difficulty. Simply put, every page is going to look like crap on a cell phone. A 320 x 240 pixel screen is not designed to display web pages.
Pythagosaurus
01-11-2007, 18:54
2. Bad choice. Really really bad one. That's what I would have said years ago. Before the modern standards, and the accessible/mobile web.
Some people use their phones to browse NS. Some mobile browsers pre-process the requests and resize/compress while others don't... but that's not really a solution. The user must be able to access NS everywhere, with no nuisance, and all under the standards.


I don't know what you're going on about here. What does any of that have to do with programmatically enforcing image sizes?


Can you explain that claim? I find it very debatable. Unless you're speaking of something different.

PNG is obviously superior to GIF as an image format, but the fact remains that it's not well-supported. For example, have you ever tried to view a transparent PNG in IE?
Tiago Silva
12-11-2007, 20:16
Seems to me that if you're surfing with a non-standard device, you must accept a certain level of difficulty. Simply put, every page is going to look like crap on a cell phone.
Standard devices...?

A 320 x 240 pixel screen is not designed to display web pages.
I can display websites perfectly. It's kind of a bitch to do it with the NS profile... when an image occupies the entire viewing space (assuming there's no pre-process).

I don't know what you're going on about here. What does any of that have to do with programmatically enforcing image sizes?
I assumed that " programmatically" was related to programming. Because I think that there are methods on perl to triage that.* And yeah, bad translation from me.


PNG is obviously superior to GIF as an image format, but the fact remains that it's not well-supported. For example, have you ever tried to view a transparent PNG in IE?
As far as I know, there's only issues with color-correction and gamma.
This isn't the IE5(?) era. IE no longer crashes when displaying PNGs. It's been more than 10 years since the W3C recommendation and several years since the standardization. It's not a format issue. This is a flawed browser implementation.
*Server-side can deal easily with all the submitted image types there was discussed here (from what I recall): it parses what's not an image, under the specs; deals with height/width; and the binary size.
I seriously don't think that the NS crowd will bitch about those issues because: they wouldn't care and because all this revolves on known IE limitations, and as such, they have to suck it up. And with the current enforcing/spread on IE7, the native alpha-channel inconvenient, which I assume you were initially aiming on, will be long gone.
Don't bend over for quirks mode, man. It will get you raped.
(Funny to say that, since that's how NS is displayed. :p)
The Most Glorious Hack
13-11-2007, 07:24
Standard devices...?"Computer"
Tiago Silva
24-03-2008, 10:19
"Computer"
Computer says no... And the specs too.

Edit: posted in the update thread