c语言读取jpg字节,JPG图片C语言解码显示例子

您所在的位置:网站首页 c语言如何读取图片 c语言读取jpg字节,JPG图片C语言解码显示例子

c语言读取jpg字节,JPG图片C语言解码显示例子

2023-09-13 13:47| 来源: 网络整理| 查看: 265

企图解码JPG的图片并且代码完全由自己来写,那是不容易的,据我所知这种代码完全可以当做硕士研究生的毕业论文了.

我今天用的是Tjpg解码库库函数大概1000行,显示过程中除了需要Tjpg解码库提供的两个库函数

/* Error code */

typedef enum {

JDR_OK = 0,        /* 0: Succeeded */

JDR_INTR,        /* 1: Interrupted by output function */

JDR_INP,        /* 2: Device error or wrong termination of input stream */

JDR_MEM1,        /* 3: Insufficient memory pool for the image */

JDR_MEM2,        /* 4: Insufficient stream input buffer */

JDR_PAR,        /* 5: Parameter error */

JDR_FMT1,        /* 6: Data format error (may be damaged data) */

JDR_FMT2,        /* 7: Right format but not supported */

JDR_FMT3        /* 8: Not supported JPEG standard */

} JRESULT;

/* Rectangular structure */

typedef struct {

WORD left, right, top, bottom;

} JRECT;

/* Decompressor object structure */



【本文地址】


今日新闻


推荐新闻


    CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3