views:

229

answers:

6

I have a format for signatures in a database that an uncooperative vendor has been using for a client of ours. We are replacing their system.

A signature begins:

0A000500010002000100020001000100010001000100010001000100D100010001004F0001000100
01000100010001000100010001000100010001000100010001000100FF00FF00FF00010001000100
01000100010001000100010001000100010001000100010001000100010001000100010001000100
01000100010001000100010001000100010001000100010001000100010001000100010001000100
01000100010001000100010001000100010001000100010001000100010001000100010001000100
01000100010001000100010001000100010001000100010001000100010001000100010001000100
010001000100010002001C0001000100010001000100010001000100010001000100010001000100
01000100010001000100010001000100010001000100010001000100010001000100010001000100
01000100010001000100010001000100010001000100010001000100010001000100010001000100
01000100010001000100010001000100010001000100010001000100010001000100010001000100
01000100010001000100010001000100010001000100010001000100010001000100010001000100
01000100010001000100010001000100010001000100010001000100010001000100010001000100
01000100010001000100010001000100DA00FF00C100C000C100FF00DA00FF00C100C000C100FF00
DA00FF00C100C000C100FF00DA00FF00C100C000C100FF00DA00FF00C100C000C100FF00DA00FF00
C100C000C100FF00DA00FF00C100C000C100FF00DA00FF00C100C000C100FF00DA00FF00C100C000
C100FF00DA00FF00C100C000C100FF00DA00FF00C100C000C100FF00DA00FF00C100C000C100FF00
DA00FF00C100C000C100FF00DA00FF00C100C000C100FF00DA00FF00C100C000C100FF00DA00FF00
C100C000C100FF00DA00FF00C100C000C100FF00DA00FF00C100C000C100FF00DA00FF00C100C000
C100FF00DA00FF00C100C000C100FF00DA00FF00C100C000C100FF00DA00FF00C100C000C100FF00
DA00FF00C100C000C100FF00DA00FF00C100C000C100...

continues with more image data and ends with a long series of 0100's.

Any ideas on what the file format is?

Thanks.

+2  A: 

Looks like it might be a really simple format. 0A seems to be a header. Then it looks like pairs of darkness values, although it seems like 50% of the space is wasted. If you post a file, I'd be happy to try to write a converter.

The whole file is necessary because it looks like there's a fixed image size, and it might take a little fiddling. Do you have an image that's not confidential, but still has data in it?

tfinniga
+1  A: 

It looks like RAW, un-encoded image data. Have you tried loading it straight into a two dimensional buffer and seeing what you get? Copy the file and name it foo.raw and try loading it in Photoshop, for example. If my guess is correct and it is just raw 16bit samples, you will have to supply the width and height yourself. The number of channels may be 1x16bit. As tfinniga says, the first two bytes may be a header you will have to skip.

Jared Updike
I'll try saving it as RAW and loading it into some stuff. Thanks.
PRMan
A: 

I never seen this file format... maybe is a 'private format', and looks like easy to decode.

Edit: looks like the bytes are arranged in group of 2 (2 'xx' hexadecimal numbers)

Elieder
+2  A: 

That looks like raw pixel values from an 8-bit A/D converter (scanner), embedded in 16-bit words, little-Endian (x86) format.

Are the files all the same size? That would give you a strong clue to the image size.

John R. Strohm
+4  A: 

Taking the first 16 or so bytes of data and putting them into a file, the linux 'file' command says:

$ file test.file
test.file: PCX ver. 2.5 image data
KFro
Wow. PCX. The memories.
Jared Updike
This doesn't look like PCX. The 3rd byte is the encoding and should be 01h. The 4th byte is the bit-depth which should be 1, 4, 8, or 24. The magic file entry for PCX only looks at the first two bytes.
D.Shawley
The 00 every other byte should not be there. They were an artifact of the Access to SQL Server conversion process. I have fixed that. It then does look like PCX for about 10 bytes or so, but then gets screwed up.
PRMan
A: 

The most important part is: What can it contain ?

ZeroCool
"I have a format for signatures in a database..."
PRMan