Optimal JPEG thumbnail dimensions
Optimal JPEG thumbnail dimensions
Hi,
I only know a little about the JPEG format but I thought that JPEGs are subdivided into "blocks" at a low level. Is it therefore the case that if you want to generate as small a thumbnail image as possible you should select image dimensions that are divisible by this block size? If so what should the dimensions ideally be divisible by?
I only know a little about the JPEG format but I thought that JPEGs are subdivided into "blocks" at a low level. Is it therefore the case that if you want to generate as small a thumbnail image as possible you should select image dimensions that are divisible by this block size? If so what should the dimensions ideally be divisible by?
-
- Posts: 1944
- Joined: 2010-08-28T11:16:00-07:00
- Authentication code: 8675308
- Location: Montreal, Canada
Re: Optimal JPEG thumbnail dimensions
With the most commonly used parameters, width and height should be multiples of 16 (they can be different without harm) with the default chroma subsampling, 8 if you turn off chroma subsampling.
Re: Optimal JPEG thumbnail dimensions
Why might someone turn off chroma subsampling?
-
- Posts: 1944
- Joined: 2010-08-28T11:16:00-07:00
- Authentication code: 8675308
- Location: Montreal, Canada
Re: Optimal JPEG thumbnail dimensions
1) If your image is very small and its dimensions are not multiples of 16, you may not gain much compression given the quality decrease.
2) Subsampling adds artifacts which are sometimes better avoided by not subsampling but instead decreasing the quality setting of the chroma channels: http://www.wfu.edu/~matthews/misc/jpg_v ... maSub.html.
The full story on optimizing JPEG is complicated business which I don't want to go into. Partly because this is how I make my living.
2) Subsampling adds artifacts which are sometimes better avoided by not subsampling but instead decreasing the quality setting of the chroma channels: http://www.wfu.edu/~matthews/misc/jpg_v ... maSub.html.
The full story on optimizing JPEG is complicated business which I don't want to go into. Partly because this is how I make my living.
Re: Optimal JPEG thumbnail dimensions
Oh, OK. That's cool, I guess. I wasn't trying to take away your livelihood.
-
- Posts: 1944
- Joined: 2010-08-28T11:16:00-07:00
- Authentication code: 8675308
- Location: Montreal, Canada
Re: Optimal JPEG thumbnail dimensions
@Bilge: No worries. Really.
I just did not want to get back "But if blah blah blah, then isn't it that blah blah blah..." Because what I said is full of caveats, and I did not feel like writing a long manual.
I just did not want to get back "But if blah blah blah, then isn't it that blah blah blah..." Because what I said is full of caveats, and I did not feel like writing a long manual.
Re: Optimal JPEG thumbnail dimensions
How do I disable chroma subsampling with ImageMagick?
-
- Posts: 1944
- Joined: 2010-08-28T11:16:00-07:00
- Authentication code: 8675308
- Location: Montreal, Canada
Re: Optimal JPEG thumbnail dimensions
I actually tried that but I got the same result as if I hadn't specified the sampling factor option at all so I thought it must be invalid. The only value that I tried which changed the output was 2x1 which resulted in a file size reduction.NicolasRobidoux wrote:Use 1x1.
-
- Posts: 1944
- Joined: 2010-08-28T11:16:00-07:00
- Authentication code: 8675308
- Location: Montreal, Canada
Re: Optimal JPEG thumbnail dimensions
I vaguely remember requesting that the default be switched to no chroma subsampling. Apparently it is. I believe that with older IM 2x1 is the default.
2x1 is standard chroma subsampling.
Generally, 2x1 is a very good size reduction/visual quality trade off.
2x1 is standard chroma subsampling.
Generally, 2x1 is a very good size reduction/visual quality trade off.
-
- Posts: 1944
- Joined: 2010-08-28T11:16:00-07:00
- Authentication code: 8675308
- Location: Montreal, Canada
Re: Optimal JPEG thumbnail dimensions
Yes, I'm pretty sure that I made that request, on the basis that users should get something very very good when the JPEG quality setting is set to a high value, and you simply don't get that with 2x1, no matter the quality setting. If you set the quality to 95, it generally makes no sense to use 2x1.