0

We have a Oracle 9i database and OrderDetails table which has a column to store binary data for product images. These images can be viewed only using a 3rd party tool. I have no idea which 3rd party tool. and I have no idea of the format of the image.

Is there anyway from the binary data we can find what format is the image?

Thanks

4

3 回答 3

2

file or libmagic is a good place to start.

于 2010-03-16T00:54:21.773 回答
1

根据您的描述,尚不清楚是否需要第三方工具来访问数据或显示数据。数据很可能只是 JPG、BMP 或 PNG,而该工具基本上是一个 SQL 前端。要验证这一点,请尝试将二进制数据写入文件(小心告诉您的程序它是二进制数据),然后尝试使用标准图像工具打开它。一个体面的图像编辑器会忽略扩展名并嗅探数据以获取格式。

如果您验证它确实是一个标准的二进制图像,您有两个选择:

  1. 批量转换为 JPEG,省去学习格式的精力。
  2. 找到一个告诉你格式的工具(有很多工具,包括 Imagemagick identify甚至
    在线工具
于 2010-03-16T01:49:01.127 回答
-1

Yeah, read about headers of JPG, PNG, GIF and other popular image formats and try to recognize their headers in your data.

于 2010-03-16T00:54:42.957 回答