View Single Post
Old 04-12-2010, 04:42 PM   #13
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 998
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
Quote:
Originally Posted by GodzillaNL View Post
Can you explain how I should interpretate the stroke information in the BLOB field?
Did you have time to look at the file I send a few post back. I copied some structures from the erscribble-library that can be laid down onto the blob-data and wrote some functions to parse the blob data.

From my notes the interpretation of a very simple blob structure, hope this helps with reading the code and the structure of the blob:
0100 version
00000000 orientation
0000000000000000 page_pixel
0000 page_r
0000 page_g
0000 page_b
00000000 ul_x
00000000 ul_y
D7040000 lr_x -> 04d7
DA060000 lr_y -> 06da
02000000 num_strokes -> 2
STOKE:
03000000 color
A6838942 zoom <-- float
00000000 layer
00000000 shape
03000000 width -> 3
02000000 points -> 2
POINTS:
2e000000 x
3a000000 y
00000000 pressure
2e000000 x
3a000000 y
2C5D1600 pressure <-- not sure what to do with this
STROKE:
03000000 color
A6838942 zoom <-- float
00000000 layer
00000000 shape
03000000 width
05000000 points
POINTS:
30000000 x
44000000 y
00000000 pressure
2f000000 x
45000000 y
58C94000 pressure
30000000 x
45000000 y
58C94000 pressure
31000000 x
45000000 y
58C94000 pressure
2f000000 x
45000000 y
2C5D1600 pressure
The code also contains the following comment:
// Best results gives the following formula where:
// points from file are scaled using the zoom factor of the stroke_device
// then they are scaled from 'input' DPI (160) to 'output' DPI (72)
// for some reason a factor of (1-1/16) is needed to scale all to
// the correct resolution (maybe related to margins?)
So I also had to 'play' a little bit to get it correct.

Hope this helps.
Mackx is offline   Reply With Quote