resource sizes with gdk-pixbuf-csource
- From: "Matt Hoosier" <mwhoosier gmail com>
- To: gtk-app-devel-list gnome org
- Subject: resource sizes with gdk-pixbuf-csource
- Date: Mon, 7 Aug 2006 09:21:26 -0500
Hi,
I'd like to use gdk-pixbuf-csource for the usual reasons (to eliminate
runtime file access in an application).
I've noticed that the C arrays created by this, even when compiled to
object code, are much larger (at least for the PNG's I'm trying) than
the original graphic file. For example,
gdk-pixbuf-csource foo.png > foo_png.c
gcc `pkg-config --cflags gtk+-2.0` -c foo_png_harness.c
The C file which actually gets compiled above does nothing more than
add the right #include statements so that the right datatypes are
declared, then directly include foo_png.c.
The resulting file sizes are:
foo.png: 7856 bytes
foo_png_harness.o: 12993
I've fiddled around with different switches to gdk-pixbuf-csource, but
nothing seem to crack this blowup ratio of about 5:3. Presumably the
inlined resource is a little bigger because some preprocessing has
been done to make the bytewise content of the array more palatable for
use as a GdkPixbuf. Is this just the best I can get, or is there some
more tricky way to make the tool just insert a bytewise copy of the
image file, and let the pixbuf do all decoding at runtime?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]