Silkroad Online Forums

A community forum for the free online game Silkroad Online. Discuss Silkroad Online, read up on guides, and build your character and skills.

Faq Search Members Chat  Register Profile Login

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: The difference between PNG and JPEG
PostPosted: Wed Sep 07, 2011 8:57 pm 
Valued Member
User avatar
Offline

Joined: Dec 2009
Posts: 492
Location: ಠ_ಠ
Quote:
Ok, pretend that you have a book, and you want to make it smaller. The JPEG way to do it is to read the book and summarise it, so for example, you say, "On the first page you're introduced to the main character, Joe Bupkins, who is a retired mechanic. There are two paragraphs about his childhood, when he broke his leg falling out of a tree..." and so on, and you do this for the whole book. Then on the other end, someone reads the summary and tries to re-write the book from the description of it. It's not perfect, but the general story will be correct (ignoring writing style and so on).

The PNG way is to look at each word, and then write the word and the number of times it occurs. For a novel, that will almost always be 1 -- so for example, "It occurred to Joe Bupkins" translates to "It 1 occurred 1 to 1 Joe 1 Bupkins", and what you get will actually be longer than the novel you started with! But if you had a text that looked like "Buffalo Buffalo Buffalo Buffalo Buffalo Badger Badger", that becomes "Buffalo 5 Badger 2", and you can make it much shorter. Also, PNG allows you to get back the exact original text.

An image like a nature photo is like a novel -- just as every word is different, every pixel in a nature photo is different. So if you encode it with PNG, it will actually make it bigger. But PNG works great if your image is, say, a solid black circle on a solid white background -- because there is a lot of uniform color, PNG compresses it exactly.


http://reddit.com/r/explainlikeimfive/c ... g_and_png/

Nice analogy. :)

_________________
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 14 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group