Re: [Muine] Muine database structure



On Tue, 2005-09-06 at 17:33 -0700, David McCabe wrote:
> Have a look at  db_unpack_pixbuf (gpointer p, GdkPixbuf **pixbuf) in
> libmuine/db.c. Translating it into python should be no problem.


I just got round to having another go at this.  As a reminder, I'm
trying to extract a Pixbuf object from each of the entries in covers.db
(the GDBM file) using a Python script.  

My difficulty is in interpreting what's going on in the function
referred to above.  Specifically, how is the _ALIGN_ADDRESS stuff
affecting where the start of the data I want to extract starts and
finishes?  Presumably the extraneous stuff is whether we have checked
for an image already etc.?

It would be really good if someone could describe to me how the image
itself fits into the byte stream.  Are there fixed lengths for the muine
header, or sentinel bytes which I could use to find where the image
starts and finishes?

I think I can then use the gtk.gdk.pixbuf_new_from_inline(data_length,
data, copy_pixels) function to create a pixbuf from the relevant bits of
data.

Would really appreciate some help - am just a web script person really,
but would love to get over this hurdle!

M






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]