我已经创建了一个C++结构来读取和验证JFIF文件格式的标头.结构如下......
#pragma pack(1)
typedef struct _JFIF_Header
{
WORD SOIMarker; // start of image marker
WORD APP0_Marker; // Application use marker
WORD APP0_Length; // Length of APP0 field
BYTE Identifier[5]; // zero terminating string "JFIF",X'4A', X'46', X'49', X'46', X'00'
BYTE Version[2]; // X'01',X'02'
BYTE Units; // units = 0:no units ;; units = 1:X and Y are dots per inch ;; units = 2:X and Y are dots per cm
WORD XDensity; // horizontal pixel density
WORD YDensity; // vertical pixel …
Run Code Online (Sandbox Code Playgroud)