[BUG] Forum avatar can now only be 160 x 160px [SOLVED]

Started by WillLem, November 23, 2024, 04:24:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

WillLem

When attempting to change my avatar, I kept getting the "Session verification failed" error. I tried changing the picture format, but then realised that SMF now only allows a max size of 160 x 160px for avatars.

Can this limit be increased? I'm pretty sure the Forum previously allowed much larger images (for instance, my current avatar is 1500 x 1500px).

namida

Why do you need to upload a larger avatar? It's only displayed at around 160x160 (at most) anyway.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

WillLem

Quote from: namida on November 24, 2024, 02:04:12 AMWhy do you need to upload a larger avatar?

I guess I can resize, but the scaling algorithms in paint.net are a bit rubbish. If you can recommend a good image resizer, I'll do that instead.

Silken Healer

#3
Quote from: WillLem on November 24, 2024, 03:17:51 AMbut the scaling algorithms in paint.net are a bit rubbish
Can you elaborate on what you exactly don't like about them? As far as I'm aware they have all the most used ones bicubic, nearest neighbour, etc. (which I'd assume the forum/browser/HTML would use anyway even if you could upload a large image as your avatar)

WillLem

Quote from: Silken Healer on November 24, 2024, 03:20:45 AMCan you elaborate on what you exactly don't like about them?

See the images in the QuickMod Tool topic. The text is barely readable, and that's taking a large (1500 x 800 ish) image and resizing it by 50% using the Adaptive (Sharp) algorithm; the others produce even fuzzier results. Maybe my expectations are high, but 1500p down to 750p should still look pretty good IMHO.

The avatar looks OK (if a bit small), that's 500p to 160p Nearest Neighbour. If the Forum allowed, say, 240 x 240px, that would be better.

Out of interest, what scaling algorithm does the Forum use to resize images?

Simon

Try the Lanczos algorithm.

If your tool doesn't offer that, consider Gimp (if you want a GUI) or ImageMagick (if you like the command line).

ImageMagick is common on webservers. I assume LF calls that. I don't know what exact arguments it passes; I'd have to investigate. But I'll only investigate after you've tried Lanczos and still don't like the results. :lix-evil:

People on Stack overflow suggest Lanczos. And: "Basically 'Lanczos' makes a great starting point for any sort of filter work" is from the ImageMagic docs.

-- Simon

namida

Quote from: Silken Healer on November 24, 2024, 03:20:45 AM
Quote from: WillLem on November 24, 2024, 03:17:51 AMbut the scaling algorithms in paint.net are a bit rubbish
Can you elaborate on what you exactly don't like about them? As far as I'm aware they have all the most used ones bicubic, nearest neighbour, etc. (which I'd assume the forum/browser/HTML would use anyway even if you could upload a large image as your avatar)
Yeah, this - browsers aren't going to be using something fancier than even a basic image editor.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

WillLem

Still, could we maybe increase the limit to 500 x 500 or... something?

namida

My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

WillLem

#9
Thanks for increasing the allowed avatar size.

Apologies for keeping on about it, but I'm still getting this error when I try to upload my usual avatar (which is now resized to 368 wide x 444 tall):



In the meantime, I'll use the placeholder (blue "WL"), which is 320 wide x 280 tall. Both images are in .png format (I've also tried uploading as .jpeg).

I wonder if the color palette is also limited for avatars?

If no solution presents itself easily and readily, I'll just settle for the currently uploaded avatar.

namida

Quote from: WillLem on November 27, 2024, 10:54:16 PMI wonder if the color palette is also limited for avatars?
I very, very much doubt this. That's something SMF would have to go out of their way to implement, and I doubt there's much demand for it.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Simon

Quote from: WillLem on November 27, 2024, 10:54:16 PMgetting this error when I try to upload my usual avatar (which is now resized to 368 wide x 444 tall):

Sounds like an unrelated error. Do you get this every time you upload large avatars? I remember how you successfully uploaded a large cyan rectangle. Will it hit only big files? For a workaround, can you optimize your PNGs for filesize before uploading?

What exactly is the point with the big avatars when the forum will scale down anyway? Have you tried to downscale with the Lanczos algorithm before uploading? Were you satisfied with the results?

-- Simon

WillLem

#12
Quote from: Simon on November 30, 2024, 03:19:20 PMDo you get this every time you upload large avatars? I remember how you successfully uploaded a large cyan rectangle. Will it hit only big files? For a workaround, can you optimize your PNGs for filesize before uploading?

Of course, filesize. I forgot to ask about that. Is there a limit?

My current avatar is 12.7KB. The smallest I can get my usual avatar without significant image quality loss is about 80KB. I could try optimising further, but it would be good to know what limit to aim for (or, if the limit can be increased to 100KB, that would help. 400KB would be ideal).

Quote from: Simon on November 30, 2024, 03:19:20 PMWhat exactly is the point with the big avatars when the forum will scale down anyway? Have you tried to downscale with the Lanczos algorithm before uploading? Were you satisfied with the results?

Lanczos is OK. I guess I just want to give the image the best possible chance of being decent quality before the site compresses it to avatar size. Otherwise, it will be compressed twice: once to match site allowances, then again to be displayed.

Honestly though, it doesn't matter all that much. If I know what the limits are, I can aim for that. At present it's all trial and error just to get anything uploaded.

Also, I likely won't be the only user who attempts to load a large(ish) image as their avatar, so the topic is here to benefit others/the site in general as well.

Suggested solution at this point: the Forum previously allowed quite large avatars and it didn't seem to cause any issues; I'd suggest meeting in the middle. 480 x 480 is a good height/width compromise, if there's a filesize limit I'd suggest increasing that to 480KB to match.

Mindless

If there's a file size limit, I'd suggest lowering it to 20 kB to reduce wasted Internet traffic.  Nobody needs a 480 kB avatar, especially on a forum dedicated to a retro video game.  The entirety of VGA-only Lemmings for DOS is ~460 kB.

Mindless

Quote from: WillLem on November 30, 2024, 05:40:01 PMOK, but I'd suggest applying that limit to all current avatars so that we can see how many people are affected by the change and have something to say about it.

Ex post facto rules are generally frowned upon, but FWIW, I saved all the avatars in this thread, and the largest was Simon's at 23 kB, so it really would not be so unreasonable.