如何知道TIFF图像是否采用CCITT T.6(第4组)格式? [英] How can I know if a TIFF image is in the format CCITT T.6(Group 4)?

查看:527
本文介绍了如何知道TIFF图像是否采用CCITT T.6(第4组)格式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何知道TIFF图像是否采用CCITT T.6(Group 4)的格式?

解决方案

可以使用这个(C#)的代码示例。
它返回一个表示压缩类型的值:

1:不压缩

2:CCITT Group 3

3:传真兼容的CCITT Group 3

4:CCITT Group 4(T.6)

5:LZW



<$ (pre pre $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $%$
PropertyItem compressionTag = image.PropertyItems [compressionTagIndex];
返回BitConverter.ToInt16(compressionTag.Value,0);
}


How can I know if a TIFF image is in the format CCITT T.6(Group 4)?

解决方案

You can use this (C#) code example. It returns a value indicating the compression type:

1: no compression
2: CCITT Group 3
3: Facsimile-compatible CCITT Group 3
4: CCITT Group 4 (T.6)
5: LZW

public static int GetCompressionType(Image image)
{
    int compressionTagIndex = Array.IndexOf(image.PropertyIdList, 0x103);
    PropertyItem compressionTag = image.PropertyItems[compressionTagIndex];
    return BitConverter.ToInt16(compressionTag.Value, 0);
}

这篇关于如何知道TIFF图像是否采用CCITT T.6(第4组)格式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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