FAQ Memberlist Usergroups Register Log in
Profile Log in to check your private messages Search

Trouble with Avatar
Goto page 1, 2  Next
 
Post new topic   Reply to topic     Forum Index -> General Discussion
Author Message
Violabelle



Joined: 23 Mar 2008
Posts: 182
Location: Springtime

PostPosted: Fri Apr 18, 2008 6:09 pm    Post subject: Trouble with Avatar Reply with quote

Ok. This is starting to drive me crazy. I've always hosted my av/sig on image shack, but now I get an error message each time I try to link to the image. (Error from this forum, not image shack).


Unable to upload file

DEBUG MODE

Line : 251
File : usercp_avatar.php


Anyone else having trouble with this? Is there a better hosting site that the kids are using these days? I miss my av! Sad


_________________
Back to top
View user's profile Send private message AIM Address
Mirari



Joined: 18 Apr 2008
Posts: 3
Location: college

PostPosted: Fri Apr 18, 2008 6:13 pm    Post subject: Reply with quote

well, it's not under 6kb to start with. Is it even possible to have an 80x avatar that's 6 kb or less?
_________________
In the words of M. Night Shamalayn: "What a twist!"

I got a pickle, I got a pickle, I got a pickle hey hey hey hey!
Back to top
View user's profile Send private message Visit poster's website
Violabelle



Joined: 23 Mar 2008
Posts: 182
Location: Springtime

PostPosted: Fri Apr 18, 2008 6:15 pm    Post subject: Reply with quote

Weeeeeell, it was on the old forum. Maybe the lady has changed the rules or something?
_________________
Back to top
View user's profile Send private message AIM Address
thespaceinvader



Joined: 23 Mar 2008
Posts: 650
Location: Cardiff, UK

PostPosted: Fri Apr 18, 2008 6:17 pm    Post subject: Reply with quote

Yep. The avs are significantly more restricted than they were - no more than 80x80 px, and no more than 6kb. Try saving it as a .jpg and reducing the quality til it fits. It should do reasonably easily. The i'd probably upload it from your computer rather than linking to it - it seems to work better, for me at least.
_________________
Keeper of Tristram's rings, and Felucca's very expressive ears.
Back to top
View user's profile Send private message
Violabelle



Joined: 23 Mar 2008
Posts: 182
Location: Springtime

PostPosted: Fri Apr 18, 2008 6:21 pm    Post subject: Reply with quote

Nuuuu. Sad So sad.
_________________
Back to top
View user's profile Send private message AIM Address
horsin'around



Joined: 22 Mar 2008
Posts: 1260
Location: Stupidville

PostPosted: Fri Apr 18, 2008 7:16 pm    Post subject: Reply with quote

Yeah, I've got avvie trouble too, but for different reasons. Sad
_________________
Fall down seven times, get up eight. --Japanese Proverb

If you fight for your limitations, you get to keep them.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Ponce
Back to top
View user's profile Send private message
YatesOfYore
Site Admin


Joined: 27 Dec 2006
Posts: 885

PostPosted: Fri Apr 18, 2008 8:39 pm    Post subject: Reply with quote

I've made it so that there are no off-site avatars anymore - people were just using this as a way to get around the size restrictions (which I found annoying) so no more!

I WILL however increase the size restriction to 100x100 (ya bunch o' whiners)
_________________
Keeper of Nanashi's Vambraces and the Amethyst Trees.
Back to top
View user's profile Send private message
Violabelle



Joined: 23 Mar 2008
Posts: 182
Location: Springtime

PostPosted: Fri Apr 18, 2008 9:39 pm    Post subject: Reply with quote

It's actually the file size that's the bigger problem for me. .png files look better but are bigger Sad
_________________
Back to top
View user's profile Send private message AIM Address
YatesOfYore
Site Admin


Joined: 27 Dec 2006
Posts: 885

PostPosted: Fri Apr 18, 2008 10:10 pm    Post subject: Reply with quote

I shall looketh into it

(ps I love the sig banner!)
_________________
Keeper of Nanashi's Vambraces and the Amethyst Trees.
Back to top
View user's profile Send private message
Tinalles
Site Admin


Joined: 22 Mar 2008
Posts: 1630
Location: Grand Forks

PostPosted: Fri Apr 18, 2008 11:10 pm    Post subject: Reply with quote

There's plenty that can be done to optimize this avatar. Let's take a look at the original Viola avatar:



File format: PNG
Dimensions: 80x80 pixels.
File size: 14.4 KB.
Number of unique colors in image: 4,079
Color depth: 24 bits per pixel.

The "color depth" part indicates how precisely the color values are stored. A "bit" is just a single value - either a 1 or 0. Right? So an image using exactly one bit per pixel would be strictly black and white (0 = black, 1 = white). So if you wanted to draw a small white X on a black background, you'd have a list of pixels like this:

101
010
101

But suppose you need more colors than just black and white. You need to increase the number of bits that you use for each pixel. In a 2-bit image, you could have four possible values:

00 = black
01 = yellow
10 = red
11 = white

Which could be used to make a crude smiley face:

0001010100
0101010101
0110011001
0101100101
0110101001
0001010100

It's easier to see the smiley if you unfocus your eyes a bit.

But you'll notice that there's an inefficiency here -- we didn't actually use any white in this image. But in order to get THREE colors, we have to use the same number of bits per pixel as we would for four. As a result, the amount of information we have to store (that's the file size) increases.

Now, let's look at viola's av again. It has a color depth of 24 bits per pixel, meaning that every single pixel in the image has to be recorded using 24 bits, like this:

011000110101100111010110

That's enough space to store millions upon millions of unique colors. But there are actually only 4,079 in the image, so almost all of that "space" is unused.

The ones that are there aren't being used very efficiently, either. 80 x 80 is 6,400 pixels total in the image. And there are 4,079 unique colors. That means almost ALL of the pixels have unique colors. But if you blow up the picture and look at it, most of the differences are so small that you can't really tell the difference between them.

So we can reduce the file size by reducing the number of colors used, and consequently reducing the number of bits we have to use in order to record all of them.

Modified version 1:



File Format: PNG
Dimensions: 80x80 pixels.
File size: 5.5 KB.
Number of unique colors in image: 256
Color depth: 8 bits per pixel.

If you're counting in binary, and you can only use 8 places, then you can count from 0 to 255, for a total set of 256 possible values. (Zero counts as a value here.) By combining the colors that are very similar into a single color, for a total of exactly 256 colors, we can chop off two thirds of the information required per pixel. It's not a perfect 66% decrease, because the PNG format has some other parts to it - in addition to the list of pixels, it contains a color palette where it maps colors to binary numbers, and it has to record the height and width of the image, and so on.

But we still manage to fit basically the same information into only 38% of the previous size. They really look essentially identical. For ease of comparison, consult this side-by-side enlargement showing the original PNG on the left and the 8-bit indexed PNG on the right.

We could try something similar with a GIF format, like this:

Modified version 2:



File Format: GIF
Dimensions: 80x80 pixels.
File size: 6.3 KB.
Number of unique colors in image: 256
Color depth: 8 bits per pixel.

GIF is slightly less efficient about how it stores its color palette, and so the image is a little larger -- 6.3 KB, over the 6 KB image limit. Let's try it with JPG, which is the only other image format that works widely among web browsers. I'm too lazy to make a side-by-side comparison for this one. Anyway, it's using the exact same 256 colors, so they'll look identical.

Modified version 3:



File Format: JPG
Dimensions: 80x80 pixels.
File size: 3.6 KB.
Number of unique colors in image: 4,079
Image quality: 85%.

JPG functions differently than either PNG or GIF. Instead of containing a precise list of pixels, it contains a mathematical formula for reconstructing the list of pixels. The algorithm that it uses for that is "lossy" - that is, once you've done the initial compression, it won't restore precisely the same colors in precisely the same places.

The compression process throws out some colors, and relies partially on peculiarities of how your brain processes color information to trick you into "seeing" colors that aren't actually there. It uses the same psycho-visual effects to trick you into seeing lines as more sharply defined than they actually are. Both the math and the physiology are beyond me, I'm afraid, but that's the gist of it. EDIT: if you want the full gory details about how JPG compression works, complete with cryptic algorithm notation and phrases like "discrete cosine transform", "quantization" and "Cohen-Daubechies-Fauraue 9/7 biorthogonal transform", then by all means, visit the article Image Compression: Seeing What's Not There brought to you by the American Mathematical Society.

This approach works very well for photographs, and other images that have lots of very subtle gradations in color. It doesn't work quite so well with images that have lots of large areas of basically the same color, with sharply defined lines separating those areas.

Here's an enlarged comparison of the original PNG versus the JPG, with the JPG on the right. Compare how it treats the areas of solid color - for example across the bridge of Skogul's nose, or on her shoulder, or in the blue area in the bottom right around "Vi". You'll see that some "noise" has been introduced - those are "compression artifacts" introduced in the process of converting to the JPG format.

You can see the same thing if you compare the 8-bit PNG versus the JPG. The PNG just comes out looking cleaner.

So for this particular purpose -- an image with large areas of basically similar colors, having fairly sharply defined lines -- I'd say an 8-bit PNG hits the sweet spot between file size and image quality. You can get a smaller file with JPG, but it doesn't look quite so nice. And there are no particularly noticeable visual differences between the 24-bit PNG and the 8-bit PNG.

And that's why it's useful to understand image formats -- it lets you figure out how to make lean, efficient web graphics that download fast and look good!
_________________
Keeper of The Remnant Minuon (cognomen Lucy, the Eaten One) and the Emissary Caeli
Back to top
View user's profile Send private message
Tyris



Joined: 14 Apr 2008
Posts: 876
Location: Beneath a vast mound of curly hair

PostPosted: Sat Apr 19, 2008 7:29 am    Post subject: Reply with quote

Major JPG problem #1: No transparency.
_________________
You can't look dignified when you're having fun.
Dubbed "Tetris" by Asa... apparently.
Keeper of Nanashi's ghostly blue visage and Felucca's hypothetical ejecting nose-cone.

"It's a sad thing when a man loses his cookie." - Nem
Back to top
View user's profile Send private message Yahoo Messenger
thespaceinvader



Joined: 23 Mar 2008
Posts: 650
Location: Cardiff, UK

PostPosted: Sat Apr 19, 2008 8:40 am    Post subject: Reply with quote

Major jpg problem no 1: not a problem in this instance, since no transparency is used.

=P
_________________
Keeper of Tristram's rings, and Felucca's very expressive ears.
Back to top
View user's profile Send private message
Tyris



Joined: 14 Apr 2008
Posts: 876
Location: Beneath a vast mound of curly hair

PostPosted: Sat Apr 19, 2008 9:04 am    Post subject: Reply with quote

Yeah, that was more of a personal whine. Wink
Then again, since the background isn't two-tone around here, transparency isn't strictly necessary...
*does some fiddlin'*
There.
_________________
You can't look dignified when you're having fun.
Dubbed "Tetris" by Asa... apparently.
Keeper of Nanashi's ghostly blue visage and Felucca's hypothetical ejecting nose-cone.

"It's a sad thing when a man loses his cookie." - Nem
Back to top
View user's profile Send private message Yahoo Messenger
Lady Calie



Joined: 14 Apr 2008
Posts: 51
Location: somewere in texas

PostPosted: Sat Apr 19, 2008 5:26 pm    Post subject: Reply with quote

I also had issues with this >.<
i had to resize it purely to get it under 6kb >.>;;
Back to top
View user's profile Send private message MSN Messenger
Violabelle



Joined: 23 Mar 2008
Posts: 182
Location: Springtime

PostPosted: Sun Apr 20, 2008 12:55 pm    Post subject: Reply with quote

Hm, it doesn't help that the graphics program I have is kind of skanky freeware. Thanks Tin, although I don't think I could ever replicate what you just did.
_________________
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> General Discussion All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Elveron phpBB theme/template by Ulf Frisk and Michael Schaeffer
Copyright Ulf Frisk, Michael Schaeffer 2004


Powered by phpBB © 2001, 2002 phpBB Group