private static int GetCompressionType(Image image)
{
// The zero-based index of the first occurrence within the entire array, if found; otherwise, –1.
int compressionTagIndex = Array.IndexOf(image.PropertyIdList, 0x103);
PropertyItem compressionTag = image.PropertyItems[compressionTagIndex];
return BitConverter.ToInt16(compressionTag.Value, 0);
}
Run Code Online (Sandbox Code Playgroud)
程序员你好。我写了一个程序,我可以根据用户输入旋转图像(任何类型的图像)。担心的是当我旋转 tiff 图像时,它实际上是根据用户输入旋转的,但我松开了压缩,所以使用了上面的方法(用谷歌搜索)..现在我对此有一些疑问..
| 归档时间: |
|
| 查看次数: |
656 次 |
| 最近记录: |