0

有人告诉我图片/预览的大小(宽度和高度)应该除以 16,没有余数。在日常场景中,我们也经常看到这种分辨率,例如1920x1088、2688x1520。谁能告诉我是谁制定了这个规则/限制?硬件?紧随其后的所有硬件还是其中的一些?非常感谢!

4

1 回答 1

1

Image sizes that are multiple of 16 pixels are preferred because:

1. Most of the pictures taken are saved on the phone/SD card with JPEG compression. Also, the compression for videos is based on JPEG (MPEG-4).
The JPEG compression algorithm splits the image into blocks of 8x8 pixels, so 8 pixels is actually the lowest limit, also preferred. If the image resolution isn't a multiple of 8 pixels (on both width and height) the encoding algorithm pads the image until this is achieved. This is expensive memory-wise and can complicate the encoding process for certain images/videos.
Sometimes you need to have a 16 pixel multiple due to sub-sampling (considering one of every two pixels) for video compression. [JPEG codec example]

2. Alterations(rotations/flips) to a JPEG image can be done without loss of quality as long as the image size is multiple of 1 MCU (minimum coded unit). [JPEG lossless editing]

于 2013-07-03T15:53:18.653 回答