How to find the file format from binary data [closed]
-
20-09-2019 - |
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
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:
- Batch convert to JPEG, saving yourself the effort of learning the format.
- 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.