Page 1 of 1

How to create image from string

Posted: Wed Sep 15, 2010 1:18 pm
by girish_a
Hi All,
I have received a string which represents an image as following

88A30003E0772603ACECC67506000000508E270319000000004AFA03424DAD090C000000000000000000000001000000220007006C0065006E00670074006800000000000000000010000000080000006800000002000000D4A51F03000000000200000000000000480000000000000000000000000000000000000010000000F89E0603670000000200000008A61F03000000000300000020A61F03470000008000FD020500000030870D03F23DC775100000000000FB03650000000200000024AA1903000000000400000031000000450000000C00000000000000000000000400000031000000630061006C006C00650072000000000080000000080000000000230360259B004200220019010C02A89B1403000000000000000018CE250300000000FFFFFFFF000000003500000002000000B0A61F030C1D0E030500000005012900350000000000000000000000D8CC250300000000FFFFFFFF000000003600000002000000E4A61F03441D0E030600000088B9CB7536000000800000000000000088D12703000000000000000043000000370000000200000018A71F03D4C70D030700000068A3F60337000000800000000000000070811C0300000000000000000000000038000000020000004CA71F0300000000080000003F00100238000000800000000000000050811C03000000000000000000000000390000000200000080A71F030000000009000000B095190339000000800000000000000030811C03000000000000000025000C027103000004000000B8A71F03000000000A000000CC3021033100300000001F03800000000000000010811C030000000000000000140000007203000004000000F0A71F03000000000B000000A4241C033100310000001C038000000000000000F0801C0300000000000000008000C875730300000400000028A81F03000000000C000000AF21080031003200000000008000000000000000D0801C030000000000000000000000007403000004000000F419FD02000000000D00000000000000310033000000000000000000A0251C030000000020251C0313002100D9010C02000000000000000076006400C700080228050300705A1003AC7F2103E47F2103E49AFB031C9BFB03549BFB038C9BFB03C49BFB03FC9BFB03349CFB03000000000000000000000000000000000000000042000900CE000C0288030300D030FA02ACECC67505000000508E2703190000006C006500424DAD090C000000000000000000000001000000000000006C0065006E00670074006800000003031000000010000000F0A81F0366000000020000003CA91F0300000000020000000CA91F0346000000000000000000000000000000000000001000000018FD23036A0000000200000070A91F03000000000300000088A91F034A0000000000000000000000000000000000000010000000000000006500000002000000AC221C03000000000400000000000000450000000C00000000000000000000000400000025000000630061006C006C006500720000001F0303000000A0ECC675740069006D00650020002200EC00080258C52103A809FC0200000000000000002C36C775000000000000000000000000E0A91F03000000008000F703945DF70380840D03C45E1B03800000000000000058BEFC020000000000000000000000000000000000C1CB75050000000000000013000D009F010C0200000000000000000000000000010000004000002C391C0380391C031023FD030F000000020000004000000002000000020000001400000084AA1F032C391C0360391C037013200378C3F902F426F803B0A10003E4A1000318A20003D41AFD030000000080000703F82BFD02D850240300000000000000000A000000D30700000400000000000000000000000100000009004B008C01080200000000000000000000000000000000507AF903000000008C7AF9030000000000000000000000000C7AF903000000000000000000000000000000000000000022005400B3000C02B8DB1303082F2303A0ECC675B8CF25030AA84D760000000012000000300000000200000000000000000000000100000073007400300000008000FB0380D4000380820D0330DF000310000000806A0603660000000200000094AB1F030000000002000000A8AB1F034600000000000000000000000000000000000000100000008000C8756A00000002000000C8AB1F030000000003000000000000004A00000000000000000000000000000000000000

I have opened this in Textpad and it looks like each character is represented in ASCII. My Question is How can I convert this string into an image file ( at this stage I don't care if it is any format as long it works ). I have tried the function createimagefromstring but that didn't work and said Data format Error ,etc.

Please advise.

Regards,
Girish

Re: How to create image from string

Posted: Wed Sep 15, 2010 1:25 pm
by Jonah Bron
Do you have any more information about the string? It looks like a hexadecimal number. What format was the picture in?

Re: How to create image from string

Posted: Wed Sep 15, 2010 1:32 pm
by girish_a
Hi Jonah,
This string is a product of a fingerprint scan. The Manual says it is ASCII Hex string.

Regards,
Girish

Re: How to create image from string

Posted: Wed Sep 15, 2010 1:44 pm
by alex.barylski
That may not equate to an actual visual image, much like an ISO is an image, but not a viewable image like PNG. Why do you want to view this image?

My guess it's a unique hexadecimal output generated only by a specific finger print, you store it much like you would a SHA256 hashed password. Although I am not sure there is any purpose in rehashing the value.

Cheers,
Alex

Re: How to create image from string

Posted: Wed Sep 15, 2010 1:51 pm
by girish_a
I need to show this on a webpage that is the reason I need to create an image out of this string.

Thanks,
Girish

Re: How to create image from string

Posted: Wed Sep 15, 2010 2:11 pm
by alex.barylski
Your string was lot longer than I thought it was but still only about 4K that would be a pretty small image, not really relevant to the naked eye. What do the finger print scanner say? That it's a snapshot/representation of a scanned finger print? Or a calculated/hashed image of a finger print?

Cheers,
Alex

Re: How to create image from string

Posted: Sat Oct 09, 2010 2:55 am
by kalpesh.mahida
I think php manual on GD library can help you out to solve your problem.
here is the link http://php.net/manual/en/book.image.php
the GD library also has function called imagecreatefromstring i guess this is what you are looking for.
more detail on the function can be found at http://www.php.net/manual/en/function.i ... string.php
you can digg into the topic regarding image and manipulations at http://www.php.net/manual/en/book.imagick.php as well

Hope this will help you.

Kalpesh Mahida