Hi,
yes, it was a problem with the lua code.
The problem here is how to escape the images data before inserting into the BLOB field.
Similar code in python works ok, as you can use sqlite3.Binary(img_data).
In fact, there is a bug in ldbi, the sqlite3 bindings for lua I'm using, conn:escape don't escape the binary data properly.
So I'm now waiting here...
The idea is to make this lua script work in order to be able to do it from inside the DR.
Stay tunned ;-)
EDIT: btw, it works even with images of any size, but obviously we should use proper sizes, 60x60 for small and 120x120 for medium
EDIT2: I've included the sample python script.
Mount your DR device in your Linux computer and run as:
# python icons.py <path_to_your_DR_mount_point>
f.e.
# python icons.py /media/DR800
Eject device and that's all.
EDIT3: added a screenshot
Last edited by Iņigo; 05-10-2010 at 04:56 PM.
Reason: Added icons.py script
|