1 USING: accessors arrays continuations gdk.pixbuf.ffi glib.ffi gobject.ffi
2 images.loader images.loader.gtk images.loader.gtk.private io
3 io.encodings.binary io.files kernel tools.test ;
4 IN: images.loader.gtk.tests
6 : open-png-image ( -- image )
7 "vocab:images/testing/png/basi0g01.png" load-image ;
10 open-png-image [ dim>> ] [
11 image>GdkPixbuf &g_object_unref
12 [ gdk_pixbuf_get_width ] [ gdk_pixbuf_get_height ] bi 2array
18 open-png-image image>GdkPixbuf &g_object_unref
19 "frob" GdkPixbuf>byte-array
20 ] [ g-error? ] recover