Pixbuf.this
- this(GdkPixbuf* gdkPixbuf, bool ownedRef)
- this(GdkColorspace colorspace, bool hasAlpha, int bitsPerSample, int width, int height)
- this(Bytes data, GdkColorspace colorspace, bool hasAlpha, int bitsPerSample, int width, int height, int rowstride)
- this(char[] data, GdkColorspace colorspace, bool hasAlpha, int bitsPerSample, int width, int height, int rowstride, GdkPixbufDestroyNotify destroyFn, void* destroyFnData)
- this(string filename)
- this(string filename, int width, int height, bool preserveAspectRatio)
- this(string filename, int width, int height)
- this(ubyte[] data, bool copyPixels)
- this(InputStream stream, Cancellable cancellable)
- this(InputStream stream, int width, int height, bool preserveAspectRatio, Cancellable cancellable)
- this(AsyncResultIF asyncResult)
- this(string[] data)
gdkpixbuf Pixbuf Pixbuf
constructorsfunctionsstatic functionsvariables
Create a gdk.Pixbuf from a flat representation that is suitable for storing as inline data in a program. This is useful if you want to ship a program with images, but don't want to depend on any external files.
gdk-pixbuf ships with a program called [gdk-pixbuf-csource][gdk-pixbuf-csource], which allows for conversion of gdk.Pixbufs into such a inline representation. In almost all cases, you should pass the --raw option to gdk-pixbuf-csource. A sample invocation would be:
|[ gdk-pixbuf-csource --raw --name=myimage_inline myimage.png
For non-const inline data, you could get out of memory. For untrusted inline data located at runtime, you could have corrupt inline data in addition.