加载中…
个人资料
spotofleopard
spotofleopard
  • 博客等级:
  • 博客积分:0
  • 博客访问:267,047
  • 关注人气:28
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
相关博文
推荐博文
正文 字体大小:

Losssless join of JPEG

(2012-06-16 02:17:09)
标签:

无损

连接

jpeg

杂谈

分类: 技术
working flow of JPEG compression
1.RGB to YUV space
2.8x8 block DCT
3.Quantization
4.Huffman Encoding
Refer to Wikipedia for more details.JPEGsnoopis a very useful tool.

I wanted to add a databar to bottom of a large JPEG image(20M pixels), without decompressing it.
1. use libjpeg to get DQT of origianl image: jpeg_read_header()
2. use libjpeg to find DC coefficients of last block of original image. : JPEG_read_coefficients()
3. generate bitmap of the databar, then encode it using libjpeg, make sure the compression parameters are consistent with original image, such as DQTs, vertical sampling factor.
4. recalculate first block's DC values of databar,encode again.
5. copy the rest of databar encoded data
6. modify SOF0 image size

我爱北京天安门Losssless <wbr>join <wbr>of <wbr>JPEG

0

阅读 收藏 转载 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 电话:4000520066 提示音后按1键(按当地市话标准计费) 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 会员注册 | 产品答疑

新浪公司 版权所有