Question

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

Was it helpful?

Solution

file or libmagic is a good place to start.

OTHER TIPS

From your description it isn't clear whether the third-party tool is needed to access the data or to display it. It is entirely probable the data is simply JPG, BMP or PNG and the tool is basically an SQL frontend. To verify this try to write out the binary data to a file (being careful to tell your program it's binary data) and then try to open it with a standard image tool. A decent image editor will ignore the extension and sniff the data to get the format.

If you verify it really is a standard binary image you have two options:

  1. Batch convert to JPEG, saving yourself the effort of learning the format.
  2. Find a tool that tells you the format (there are many including Imagemagick identify and even
    online tools)

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top