ImageMagick JPEG compression block size
ImageMagick JPEG compression block size
Any idea on what block size (8x8 or 16x16 ??) is used in JPEG compression by ImageMagick? And, is there a way to change this default block size?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: ImageMagick JPEG compression block size
I do not know. The best reference I know is http://www.imagemagick.org/Usage/formats/#jpg_write
Re: ImageMagick JPEG compression block size
Yes, I already looked at it. In -sampling-factor option, it talks about the block size in addition to chroma sampling. However, I'm not able to relate them. I tried finding about it a lot and my best guess is when I say -sampling-factor 1x1, it takes the block size as 8x8. Similarly, for -sampling-factor 2x2, block size 16x16. May be it's like multiple of 8. Chroma sampling is not directly related to block size, however, it may have to do something in deciding the block size in ImageMagick jpeg compression algo. But it's not documented anywhere and hence not sure about it.fmw42 wrote:I do not know. The best reference I know is http://www.imagemagick.org/Usage/formats/#jpg_write
Re: ImageMagick JPEG compression block size
I found this link: en.wikipedia.org/wiki/JPEG. It says "After subsampling, each channel must be split into 8×8 blocks. Depending on chroma subsampling, this yields (Minimum Coded Unit) MCU blocks of size 8×8 (4:4:4 – no subsampling), 16×8 (4:2:2), or most commonly 16×16 (4:2:0)."