资源简介
采用VC代码实现JPEG图像压缩,DCT变换,霍夫曼编码
代码片段和文件信息
#include
#include
#include
#include “jpg_encode_types.h“
#include “jpg_encode_globals.h“
#include
TJPEG_ENC_GLOBAL JEPG_ENC;
TJPEG_ENC_GLOBAL *TJE;
/*
BYTE DQTinfoYtable[64]={1111111111111112
1111122212333333
3334543343334544
5555534666565555};
BYTE DQTinfoCbtable[64]={1111112112533355
5555555555555555
5555555555555555
5555555555555555};
float fdtblY[64]={0.1250.090120.09567090.1063040.1250000.07954740.07699000.151021
0.09012000.06497290.06897480.07664070.09012000.03823370.05550670.108880
0.09567090.06897480.07322330.08136140.04783540.04058860.05892560.115587
0.1063040.07664070.08136140.09040390.03543460.03382480.04910590.128433
0.1250000.09012000.04783540.03543460.04166670.03181900.04619400.113266
0.1590950.05735050.04058860.04509970.03977370.04049790.04899480.115328
0.1154850.05550670.04419420.04910590.04619400.04899480.07112940.167431
0.1132660.06532820.06935200.07705980.07551060.1153280.1674310.328427};
float fdtblCb[64]={0.1250000.09012000.09567090.05315190.02500000.03181900.04619400.0906127
0.09012000.06497290.06897480.02554690.01802400.02294020.03330400.0653282
0.09567090.06897480.02440780.01627230.01913420.02435320.03535530.0693520
0.05315190.02554690.01627230.01808080.02126080.02705980.03928470.0770598
0.02500000.01802400.01913420.02126080.02500000.03181900.04619400.0906127
0.03181900.02294020.02435320.02705980.03181900.04049790.05879380.115328
0.04619400.03330400.03535530.03928470.04619400.05879380.08535530.167431
0.09061270.06532820.06935200.07705980.09061270.1153280.1674310.328427};
*/
void writebyte(BYTE bTJPEG_ENC_GLOBAL *TJE)
{
*TJE->fp_jpeg_stream++ = b;
TJE->jpeg_length += 1;
}
void writeword(WORD wTJPEG_ENC_GLOBAL *TJE)
{
writebyte((BYTE)(w/256)TJE);
writebyte((BYTE)(w%256)TJE);
}
void write_APP0info(TJPEG_ENC_GLOBAL *TJE)//Nothing to overwrite for APP0info
{
writeword(TJE->APP0info.markerTJE);
writeword(TJE->APP0info.lengthTJE);
writebyte(‘J‘TJE);
writebyte(‘F‘TJE);
writebyte(‘I‘TJE);
writebyte(‘F‘TJE);
writebyte(0TJE);
writebyte(TJE->APP0info.versionhiTJE);
writebyte(TJE->APP0info.versionloTJE);
writebyte(TJE->APP0info.xyunitsTJE);
writeword(TJE->APP0info.xdensityTJE);
writeword(TJE->APP0info.ydensityTJE);
writebyte(TJE->APP0info.thumbnwidthTJE);
writebyte(TJE->APP0info.thumbnheightTJE);
}
void write_SOF0info(TJPEG_ENC_GLOBAL *TJE)// We should overwrite width and height
{
writeword(TJE->SOF0info.markerTJE);
writeword(TJE->SOF0info.lengthTJE);
writebyte(TJE->SOF0info.precisionTJE);
writeword(TJE->SOF0info.heightTJE);
writeword(TJE->SOF0info.widthTJE);
writebyte(TJE->SOF
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 148480 2008-05-23 14:47 jpg_enc\Debug\jpg_enc.bsc
文件 188488 2008-05-23 14:47 jpg_enc\Debug\jpg_enc.exe
文件 255308 2008-05-23 14:47 jpg_enc\Debug\jpg_enc.ilk
文件 209632 2008-05-23 14:47 jpg_enc\Debug\jpg_enc.pch
文件 476160 2008-05-23 14:47 jpg_enc\Debug\jpg_enc.pdb
文件 32213 2008-05-23 14:47 jpg_enc\Debug\jpg_encode.obj
文件 0 2008-05-23 14:47 jpg_enc\Debug\jpg_encode.sbr
文件 3270 2007-11-14 13:35 jpg_enc\Debug\jpg_encode_data.obj
文件 0 2007-11-14 13:35 jpg_enc\Debug\jpg_encode_data.sbr
文件 41984 2008-05-25 08:16 jpg_enc\Debug\vc60.idb
文件 53248 2008-05-23 14:47 jpg_enc\Debug\vc60.pdb
文件 33111 2008-03-16 21:42 jpg_enc\fp.jpg
文件 4525 2006-02-20 13:27 jpg_enc\jpg_enc.dsp
文件 537 2006-02-17 14:32 jpg_enc\jpg_enc.dsw
文件 115712 2008-05-25 08:17 jpg_enc\jpg_enc.ncb
文件 111616 2008-05-25 08:17 jpg_enc\jpg_enc.opt
文件 248 2008-05-25 08:16 jpg_enc\jpg_enc.plg
文件 31222 2007-06-11 20:18 jpg_enc\jpg_enc.rar
文件 16384 2006-02-17 16:24 jpg_enc\SI\encoder.IAB
文件 488 2006-02-17 16:24 jpg_enc\SI\encoder.IAD
文件 4096 2006-02-17 16:24 jpg_enc\SI\encoder.IMB
文件 368 2006-02-17 16:24 jpg_enc\SI\encoder.IMD
文件 16 2006-02-21 13:20 jpg_enc\SI\encoder.PFI
文件 776 2006-02-21 13:20 jpg_enc\SI\encoder.PO
文件 1760 2006-02-17 16:24 jpg_enc\SI\encoder.PR
文件 8608 2006-02-17 16:24 jpg_enc\SI\encoder.PRI
文件 29064 2006-02-22 10:56 jpg_enc\SI\encoder.PS
文件 396 2006-02-21 13:20 jpg_enc\SI\encoder.SearchResults
文件 22127 2006-02-22 10:56 jpg_enc\SI\encoder.WK3
文件 20675 2008-05-23 14:47 jpg_enc\src\jpg_encode.c
............此处省略11个文件信息
相关资源
- spring+mybatis+springmvc+ajax简单聊天室
- VC中GDI方法在Picture控件中显示PNG、b
- springmvc4+spring4+hibernate5.1.3+二级缓存
- 间接平差编程
- 介绍uC/OS-II移植到VC的pdf
- 天津科技大学校园导游
- 基于PSO移动机器人路径规划算法
- VC实现teechart时间轴自右向左推移
- vc网卡流量监控网速监控(GetIfTable)
- springMVC配置连接数据库实现登录功能
- vc需要的psapi.h和psapi.lib
- 基于TMS320VC5402的语音信号采集系统设
- VC的MSCOMM控件
- BMP图像信息隐藏vc实现
- 自己分装的一个winhttp类
- libjpeg.so.8
- devcon.exe(32位,64位)驱动安装卸载工
- 小型公司工资管理系统设计
- VC中利用多线程技术实现线程之间的通
- 基于MVC的网上书店
- 软件的层架构设计详解
- SpringSpringMVCmybatis电商项目实战教程
- VC编程实现使用WinInet通过HTTP协议读取
- 整车控制器和电机控制器通讯协议
- maven+spring4+springmvc+redis实现分页
- VC2015及2017下可以使用的CButtonST
- VMware vsphere6.5_keygen,VCSA6.5_keygen (E
- F16运动仿真模拟
- sc_client_control_interface_tcp_vcpp
- OpenGl 飞机在蓝天飞行 纹理贴图 地形
评论
共有 条评论