Follow

@fabrixxm and also, can it get a Gtk.Image somehow? I was able to a) either save it to a file or retrieve an in-memory bitmap which could not be easily squeezed into a Gtk.Image.

Going to check it out.

· · Web · 1 · 0 · 0
@spaetz You can load the bitmap into a Gdk.PixBuf, then you can do whatever.
git.sr.ht/~fabrixxm/zint-vapi/…

I wanted to have the bitmap field as uint8[], mostly because looks vala-y and because it's what is in Gdk.PixBuf.from_data()'s signature).
I found that it needs a length to works with Gdk.PixBuf.from_data(), so I added the get_bitmap() method to set the length.. It works but I don't know if it's the correct solution... there so much things I'm not sure about and docs are useful only up to a point...

(as a side node, the zint.h header I have on disk has a bitmap_byte_length field which would be so good to use as length value for bitmap (setting it directly in field's annotation in vapi) but looks like is not used and docs doesn't mention it.....)
Sign in to participate in the conversation
mas.to

Hello! mas.to is a general-topic, mainly English-speaking instance. We're enthusiastic about Mastodon and aim to run a fast, up-to-date and fun Mastodon instance.