来自Tiff的Jpeg(jpeg压缩) [英] Jpeg from Tiff (jpeg-compressed)

查看:142
本文介绍了来自Tiff的Jpeg(jpeg压缩)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从JPEG压缩的TIFF文件中提取图像?

How can i extract image from JPEG-compressed TIFF file ?

我已经根据StripOffests和StripBytesCount字段读取了字节,但无法从中加载图像.

I've read bytes according to StripOffests and StripBytesCount fields, but i couldn't load an image from them.

推荐答案

旧样式TIFF-JPEG(压缩类型6)基本上将普通的JFIF文件填充在TIFF包装器中.较新的样式TIFF-JPEG(压缩类型7)允许将JPEG表数据(霍夫曼,量化)存储在单独的标签(0x015B JPEGTables)中.这使您可以将带SOI/EOI标记的JPEG数据条放入文件中,而不必重复霍夫曼和量化表.这可能是您在文件中看到的.各个条带以序列FFD8开头,但缺少霍夫曼和量化表.这是Photoshop产品通常写入文件的方式.

Old style TIFF-JPEG (compression type 6) basically stuffed a normal JFIF file inside of a TIFF wrapper. The newer style TIFF-JPEG (compression type 7) allows the JPEG table data (Huffman, quantization), to be stored in a separate tag (0x015B JPEGTables). This allows you to put strips of JPEG data with SOI/EOI markers in the file without having to repeat the Huffman and Quantization tables. This is probably what you're seeing with your file. The individual strips begin with the sequence FFD8, but are missing the Huffman and quantization tables. This is the way that Photoshop products usually write the files.

这篇关于来自Tiff的Jpeg(jpeg压缩)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆