View Single Post
Old 12-12-2009, 07:07 AM   #2
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: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
Hi hanche,

The code published by iRex contains a lot of information about the format/content of the metadata.db files. For Xournal I also had to look into the format of the metadata.db files to be able to import the annotations made with the native DR application into Xournal. I also used the code from thomega to better understand the structure. Also take a look at the code in: Sources\1.7\iRex\libs\erscribble\test.

I attached the source file that contains the code to do the import. Xournal is using a GnomeCanvas with 72DPI, so you will see that the coordinates are being converted from 160 DPI. The strange thing is that I had to use some kind of multiplication factor (1-1/16).

The code uses the libermetadb from iRex, this library is a wrapper around the sqlite3 library and has the 'knowledge' of the format of the blob. You can port the library to the PC or copy only the code you need.

Please let me know if you have more questions.
Attached Files
File Type: gz annotations.c.tar.gz (4.6 KB, 249 views)
Mackx is offline   Reply With Quote