jpg output: What does subsampling, DCT, ... do?

Ask for help and post your question on how to use XnView Classic.

Moderators: XnTriq, xnview

Post Reply
obelisk
Posts: 401
Joined: Fri Jan 09, 2009 9:54 am

jpg output: What does subsampling, DCT, ... do?

Post by obelisk » Tue May 26, 2009 5:10 am

Sorry don't even know how to search for this info. The jpg output page,
what do the items below mean, what do they do, what effects on quality/size etc?

progressive
DCT
smoothinng factor
subsampling

eL_PuSHeR
Posts: 267
Joined: Sat Apr 25, 2009 9:23 am

Re: jpg output

Post by eL_PuSHeR » Tue May 26, 2009 6:17 am

Check the Wikipedia.

Progressive, makes the image loading on a line-per-line basis (interlaced?) to preview it faster (for browsers, etc)
DCT is Discrete Cosine Transformation + Smoothing factor + subsampling are settings to fine-tune JPEG compression. I can't help you further, sorry.
Intel i7 5960X
Gigabye GA-X99-Gaming 5
8 GB DDR4 (2100)
GeForce GTX 970 (Gigabyte)

User avatar
Drahken
Posts: 884
Joined: Sun Apr 10, 2005 4:29 pm

Re: jpg output: What does subsampling, DCT, ... do?

Post by Drahken » Tue Jun 02, 2009 5:34 pm

DCT method:
You'd have to be a mathemetician or something to fully understand it, but essentially it's the compression formula. It's self- explained in the export dialog (not sure about the regular save dialog). Fast is fast but results in a larger file (not much larger though). Slow is in the middle, and float gets the best compression but is the slowest.

Smoothing factor:
Just what it says, it smooths out the image. Zoom to 100% on the preview on the export dialog & try changing it between 1 & 10, you'll see the diff if you look closely. This can marginally improve the visual quality of the image, but it's main purpose is to reduce filesize.

Progressive:
A normal (non-progressive) jpg will load line by line, at full quality, from the top down. A progressive one will load the whole image at a low quality, then gradually increase the quality as the image loads. This aspect of it is purely for use in photos you want on the web. However, there is a secondary benefit to this: A progressive jpg will have a noticably smaller filesize than a regular one (at least on most images). This is in direct contrast to the similar "interlaced" setting for pngs & gifs, which actually INcrease the size of the png/gif.

Subsampling:
Have you ever noticed how a jpg image will usually have washed out colors (especially reds)? That's due to subsampling. The subsampling setting will greatly impact both the size & quality of your image. "Default" is the lowest quality/filesize, the 1x1,1x1,1x1 option is the best. If you use the high quality setting, you can get a jpg that looks almost as good as a lossless image, but at a fraction of the filesize.
(It's a myth that jpgs have to look like crap due to being jpgs, it's just that the vast majority of jpgs one encounters were made using the crappiest subsampling setting.)
Oh the feuhrer, oh the feuhrer, oh the feuhrer's nipples bonk!

Janis
Posts: 11
Joined: Thu Jun 18, 2009 5:36 pm

Re: jpg output: What does subsampling, DCT, ... do?

Post by Janis » Thu Jun 18, 2009 11:06 pm

Thank you for the explanations! I was wandering about these same options today (and also about the Huffman table's optimization). I suggest these are added to XnView's User guide (Info -> Help).

I've been using the progressiveness purely based on the resulting file size. In addition, if you choose the image to progress in 3, 4, or 5 passes (an option that Adobe Photoshop offers), it affects the file size too. The smallest file size is usually with 4 passes for me. :)


Post Reply