开发者

How to detect a TIFF CCITT Fax Group 3 or 4 have wrong FillOrder not matching data encoding

开发者 https://www.devze.com 2023-03-10 01:10 出处:网络
As title. I\'m not interested in converting between FillOrder=2 and FillOrder=1. Rather, I have a set of TIFF files where some images were encoded with one setting but \"re-tagged\" as the other s开发

As title. I'm not interested in converting between FillOrder=2 and FillOrder=1. Rather, I have a set of TIFF files where some images were encoded with one setting but "re-tagged" as the other s开发者_运维知识库etting (so that the tag's value doesn't match the encoding method).

A human would easily tell that the image looks wrong. It will contain mostly random horizontal strips, with occasional "point disruptions". Can I write an algorithm that can detect images that are encoded or decoded wrong for this compression method?


It is relatively easy to detect if Group 3 encoded images have the bits reversed. Each line starts with an EOL which is 000000000001 (12 bits). This is easy to see if it's backwards. Group 4 images are a little harder to detect, but if you are managing the decoder, you can try to decode a few lines and if there are no errors, then you're probably using the correct bit order.

0

精彩评论

暂无评论...
验证码 换一张
取 消