在图像文件中查找压缩类型

时间:2021-03-26 08:58:13

I want to find the compression type for an image that is currently stored as .bin file (dont know why its stored like this it just is) but my question is should I find the compression type while its in a .bin file or should I do it when I convert to a .tiff file. I done tons of research and not sure whats the best way. If anyone can give me some feedback that will be wonderful. Thanks!

我想找到当前存储为.bin文件的图像的压缩类型(不知道为什么它存储就像这样)但我的问题是我应该在.bin文件中找到压缩类型还是我应该当我转换为.tiff文件时这样做。我完成了大量的研究,并不确定最好的方法。如果有人能给我一些很棒的反馈意见。谢谢!

1 个解决方案

#1


0  

You can look at the first few bytes of the file to get at least a hint as to what the image format is. Most file formats start with a few "magic numbers", precisely so that the format can be verified by the decoder. You can use this good list of magic numbers for guessing what you have, and then trying the appropriate image decoder on the data.

您可以查看文件的前几个字节,以至少获得有关图像格式的提示。大多数文件格式都以一些“幻数”开头,因此解码器可以验证格式。你可以使用这个很好的幻数列表来猜测你拥有的东西,然后在数据上尝试相应的图像解码器。

#1


0  

You can look at the first few bytes of the file to get at least a hint as to what the image format is. Most file formats start with a few "magic numbers", precisely so that the format can be verified by the decoder. You can use this good list of magic numbers for guessing what you have, and then trying the appropriate image decoder on the data.

您可以查看文件的前几个字节,以至少获得有关图像格式的提示。大多数文件格式都以一些“幻数”开头,因此解码器可以验证格式。你可以使用这个很好的幻数列表来猜测你拥有的东西,然后在数据上尝试相应的图像解码器。