How to get the width/height of jpeg file without using library?

后端 未结 7 1656
清歌不尽
清歌不尽 2020-12-25 08:43

Firstly I want to say I tried many times to find the answer by using google search, and I found many results but I did not understand, because I don\'t know the idea of read

7条回答
  •  独厮守ぢ
    2020-12-25 08:59

    Image dimensions in JPEG files can be found as follows:

    1) Look for FF C0

    2) At offsets +4 and +6 after this location are height and width (words), resp/ly.

    In most cases, the absolute offsets of height and width are A3 and A5, resp/ly.

提交回复
热议问题