Hexadecimal String to Image

Big_Si

Registered User.
Local time
Today, 16:40
Joined
Sep 9, 2008
Messages
28
Hi

I am not sure if anybody will be able to help on this one but I am hoping so as its been driving me nuts for weeks :confused:

I have an image, specifically a signature, stored in my database as a hexadecimal string. The coordinates are represented in 4 character groups, 2 bytes for the X and Y coordinate. These are standard hexadecimal pairs giving me a range of 0-255 for the X coordinate and 0-127 for the Y coordinate (the high bit of the Y coordinate is reserved). I need to plot a line between each set of coordinates in the order they come.
However as the signature may contain breaks, for instance two seperate words. If the Y coordinate is greater than 127 it means the start of a new segment and should not be connected to the previous point.

Can anybody help me to produce a VB module which will perform the task of replotting the points and saving the data in a standard image format (bitmap or vector)?

An example of one of the strings I am working with is:

16991b331c361e381e381e3808a3062426172d1f302232253427352a352c342f3232183f133b133b133b109e123312351231132f132c132a1327132412221725232c252d272e293120162016201610b01a2b1a2b3eb33e333e3368966713630e530e6e2a712c671f6b1e8135822b8b248b2753225122b51fb51f

Many Thanks
 
In effect, you would like to convert the string to a Windows BitMap file to store in the database, or would you like to plot the data directly onto a Report output? (see attached sample BMP file, based on the sample string you provided)
 

Attachments

In effect, you would like to convert the string to a Windows BitMap file to store in the database, or would you like to plot the data directly onto a Report output? (see attached sample BMP file, based on the sample string you provided)

To be honest either or would be the ideal solution. Ultimately I would be looking to output it to a report. Storage as a bitmap longterm would be useful also.

Just had a look at the image you have produced and it seems to have done the trick. Can you explain how you reached the desired result?
 
Storing bitmap data in a database is generally not recommended, as it can significantly bloat the size of your database in a very short time. Storing the signatures as Vector Data Hex strings as you mentioned you are currently is a far more efficient way to store the signatures, to be plotted on Report output by your application. I've attached a sample template; see if this solution suits your requirement.
 

Attachments

Here's the original C / C++ code which I was given. I was told this will perform the conversion I require. Unfortunately I have no knowledge of C or C++. Not sure if it can be reverse engineered from here
 

Attachments

It appears that this solution was just the trick. Many thanks for all the help on this.

Had a few issues setting it up initially but it turned out to be a glitch in the ink tool on the PDA. All resolved and works perfectly.
 
Hi,
I am facing the same issue for converting a hexdecimal string to an signature image.The conversion which is mentioned in the forum is not working out as i am working for a 32 bit character string.

Can anybody help in making the vb module for converting the string into image and then saving it into a report or standard image.

The example of the string iam working on is


652131242424242361236123612361213124242456242424234c34242461272424242451242132242132242424242436242424213077245621312133235874234f452338213a2f235358213254213958213623383a743c23322152755623517b4333235d214a234b4c70234b23306158233d4566213e433a41495b377841235b233173233344777a23492132263921365f6d21492355554f696e234523357c2a6732624e4a63235b23313f2130406577587b5e213c23322335233d21504521487b234654553e5e4121492348214f64387e436b4d7623455278234230706d7a48214b61754e6a21443a2c23567c496154213b2355562b21344553454723594f235521342b21402521325762786121432143234d2337796d5e794023376123326621312351233b235061655458235739233e404c5e35524f2347404478504d7d233e4e2e2352397b233a21494d2148656f605f592349493c45234f5846214a23384d61553d233a21527459235721472c5e235e4a21473132774a6b64213a234c4b21456a4c267c252d235b23594d21533a2c587c21534b66233a33592345714024314c55234742213a6474234b4828213a5a326e6f23316348233a50213a3f5f4e302150532153213026627d3d214a74342e234d5021513c78233c33214d4049774b5b64432354214f6b4a2346632336233b4d23325538354021522140646c737a21347e7223507b5c31234065234e45485e235e704a3e2353515d4f233350214c28213e7e692140234466235e48235d24242424242424242424242346213124247d24242424213324242421322424
Many Thanks.
 

Users who are viewing this thread

Back
Top Bottom