Can I read a specific image line using libjpeg?

Using libjpeg, if possible, I would like to read a line from the middle of a JPEG image without reading all the previous lines. It can be done?

+3
source share
1 answer

The answer is almost certainly "yes, you can, but it will take more effort than you want."

A JPEG image is a stream of markers that contain either global information for the entire compressed image, or information relating to specific parts of the image. Compression works by breaking the image into colored planes, possibly changing the color spaces by one, where color information can be sampled, and inside each plane that works with 8 × 8 blocks.

For example, you can rotate a compressed image 90 degrees if it is so large that it consists of whole blocks, only transposing the basic blocks and coefficients inside each block; that is, without decompression, rotation of the real image and re-compression.

, , , , , , , , , .

, , .

, , , , . , , , .

+2

Source: https://habr.com/ru/post/1764066/


All Articles