Closed Thread Icon

Preserved Topic: .jpeg compression..... (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=19671" title="Pages that link to Preserved Topic: .jpeg compression..... (Page 1 of 1)" rel="nofollow" >Preserved Topic: .jpeg compression..... <span class="small">(Page 1 of 1)</span>\

 
kretsminky
Maniac (V) Inmate

From: A little lower... lower... ahhhhhh, thats the spot
Insane since: Jun 2000

posted posted 09-01-2002 19:00

I was working on a bunch of digital photos today and I'm curious about .jpeg compression.

I resized all the photos from the same beginning dimensions to the same ending dimensions yet some pics are as low as 33K whereas some are as high as 77K.

What kind of factors affect jpeg compression?

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 09-01-2002 19:12

I'm not exactly sure, but I believe this is the basics of how it works:

All periodic functions (functions that repeat after a certain point), no matter what they look like, can be expressed as a sum of sine and cosine waves of various frequencies. The more you add smaller sine and cosine waves with less magnitude and less frequency (that is, the more detailed you get), the better they fit the function.

JPEG images are divided up into 8x8 squares, and somehow this theory (called Fourier Series) is applied in a two-dimensional fashion to represent the 64 pixels of color with just constants for sine and cosine wave magnitudes and frequencies.

The smoother a function is, the easier it is to fit the waves to it. When a function has major discontinuities or jumps, much more waves are required to fit it well. This is why things like solid black 1-pixel lines on white tend to produce jpeg artifacts. But smooth gradients fit very well.

So, somehow, when you adjust Photoshop's jpeg quality slider, it's adjusting the number of waves in each 8x8 block to make it fit as well as possible. Smoother blocks need fewer waves to achieve high quality.

So, basically, the smoother a picture is, the lower the file size should be.

Again, I may not be 100% correct about all this.

GRUMBLE
Paranoid (IV) Mad Scientist

From: Omicron Persei 8
Insane since: Oct 2000

posted posted 09-01-2002 19:28

slime already said most of it.

im not very sure about all this myself: but that's what i remembered from last years computer graphics course:

when you save an image you can set the sampling rate of an image from 1 to 12. so whenever you see 100% quality it means sampling rate 12 (no compression, highest quality) and 50% would mean rate 6 etc...

depending on this rate the sinus-like-function is smoothed like slime said.

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 09-01-2002 19:52

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

vogonpoet
Maniac (V) Mad Scientist

From: Mi, USA
Insane since: Aug 2000

posted posted 09-01-2002 20:02

busy photo (lots of colours/colour changes)=bigger file size (more info to compress)

boring photo (less colours/colour changes=smaller file size (less info to compress)

in a nutshell.


"....my mind is a terrible thing to have ...." ~Vp 02~

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 09-02-2002 00:40

Slime: great and understable overview of the jpeg principles.
Ini: Right, MP3 and many other formats ( such as MPG, DIVX... ) uses Fourier Transform and Discrete Cosine Tranform.

Basically FT and DCT transforms a signal from spatial domain to frenquency domain where compacting is a bit easier.
For more informations of this topic, search for Discrete Cosine Transform in Google
or throw an eye at this page http://www.ece.purdue.edu/~ace/jpeg-tut/jpgdct1.html
/!\ it heavily rely on physic and math /!\

Best regards,

Mathieu "POÏ" HENRI

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 09-02-2002 01:17

What I have yet to understand is how they take Fourier Series and extrapolate it to two dimensions.

« BackwardsOnwards »

Show Forum Drop Down Menu