Compiling image into executable
I've been using gtk and was wondering how images are put into executables so that it's self contained rather than referencing an image from a different location.
For example, how would this icon be compiled into an executable? Currently the code just references it from an image called Ban.jpg in the same directory the executable is in. Any help would be appreciated.
Code:
GdkPixbuf *create_pixbuf(const gchar * filename)
{
GdkPixbuf *pixbuf;
GError *error = NULL;
pixbuf = gdk_pixbuf_new_from_file(filename, &error);
if(!pixbuf) {
fprintf(stderr, "%s\n", error->message);
g_error_free(error);
}
return pixbuf;
}
gtk_window_set_icon(GTK_WINDOW(window), create_pixbuf("Ban.jpg"));