Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / screw space and time and physics and math and............

Author
Message
Mx5 kris
20
Years of Service
User Offline
Joined: 9th Oct 2004
Location:
Posted: 23rd Feb 2005 11:17
I was working on a site, and I made the background. It needed transparency, and what do you know, I thought png was the answer. I saved it, and compressed it, but I made a gif, because I wanted to see which one had more color. I looked at the gif and png's size. the gif was smaller. 5kb compared to 25kb! I was like wtf...I am still like wtf

Sol462
20
Years of Service
User Offline
Joined: 12th Sep 2004
Location: playing with the spazookeedoo
Posted: 23rd Feb 2005 11:19
*confused*
sounds like you had a bad day, spazuh. here ya go.
/me hands Dead and Ageek a cookie.

coffee + monkeys + creativity = games
Operation Pineapple - Multiplayer FPS WIP
Mx5 kris
20
Years of Service
User Offline
Joined: 9th Oct 2004
Location:
Posted: 23rd Feb 2005 11:22
png == really small, and next generation gif. It is smaller than gifs

gif == big, old. big

Mx5 kris
20
Years of Service
User Offline
Joined: 9th Oct 2004
Location:
Posted: 23rd Feb 2005 11:36
you were there when it happened:S

Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 23rd Feb 2005 15:40
GIF's compression works by removing most of the colours from the image (lowering it to only 256) whilst PNG works by grouping similar pixels together. It is for this reason that PNG will come out as a smaller size if you're using large blocks of the same colour, however, GIF is preferable for a complex image with few colours. For example, a scan line image (rows of the same colour) will produce a smaller sized PNG while a checkered image (blocks of alternating colours) will produce a smaller sized GIF.

There is no definitive best image file format, it will depend on what the image looks like and how much detail you require (especially the case with JPEG's).


"Computers are useless, they can only give you answers."
Mx5 kris
20
Years of Service
User Offline
Joined: 9th Oct 2004
Location:
Posted: 23rd Feb 2005 15:54
There is 3 colors.:X it is not complex. they are in the same area:S

Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 23rd Feb 2005 15:59
Yep, that sounds like GIF will be compressed more (less colours) and pixels grouped close together. They have to be spread out for PNG to work best. Post the image so we can see for sure.


"Computers are useless, they can only give you answers."
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 24th Feb 2005 02:14
PNG has several options.

i.e., Don't save PNG files using Paint, goddammit!

Mr Blanky - This Time, It's Personal
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 24th Feb 2005 02:37
Quote: "GIF's compression works by removing most of the colours from the image (lowering it to only 256)"

Wrong, it works similar to PNG, but it only works on 256 color images, which is why higher color images get dithered. I mean, if you think all it does is lower colors to 256, compare a 256 color bitmap with a GIF.


"Lets migrate like bricks" - Me
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 24th Feb 2005 08:18
They number each colour so rather than giving it 3 bytes per colour, each pixel, they give it one byte. Effectively making the size about one third less (well, there's other info contained so not quite).


"Computers are useless, they can only give you answers."
ionstream
20
Years of Service
User Offline
Joined: 4th Jul 2004
Location: Overweb
Posted: 24th Feb 2005 08:36
No, that's pretty much it. Some other stuff might be the typical image stuff (size, BPP) and in GIF's case, the transparency color. And of course, we're leaving out the fact that GIF's store animation data, for simplicities sake.

Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 24th Feb 2005 09:03 Edited at: 24th Feb 2005 09:04
Quote: "They number each colour so rather than giving it 3 bytes per colour, each pixel, they give it one byte. Effectively making the size about one third less (well, there's other info contained so not quite)."

Correct. Anything that uses 256 colors normally uses a pallet that contains 256 different references for 24bit(or 16bit) colors. Both 256 BMPs and GIFs do that. 256 color PNGs also do that as far as I know. I'm quite sure GIF and PNG use similar compression (but I can't remember the name of the technique).

Annnnyway. Theres three reasons I can think of that would make the PNG bigger..

1. The PNG isn't set as a 256 color one.
2. The PNG has a transparency layer.
3. The GIF uses a 'default' pallet therefore doesn't have to store one(though I'm not sure if thats possible.

I may be completely wrong but whatever, its the thought that counts


"Lets migrate like bricks" - Me

Login to post a reply

Server time is: 2024-11-13 19:37:36
Your offset time is: 2024-11-13 19:37:36