Re: [Gnome-print] What function to print a png file?
- From: Lauris Kaplinski <lauris kaplinski com>
- To: Carlos Perelló Marín <carlos hispafuentes com>
- cc: gnome-print helixcode com
- Subject: Re: [Gnome-print] What function to print a png file?
- Date: Wed, 7 Jun 2000 14:58:34 +0200 (CEST)
On Wed, 7 Jun 2000, Carlos Perelló Marín wrote:
> Hello, i have started to programing with gnome-print, and i can't
> print a png file, well i don't know how do it.
>
> Some help please?
gpb = gdk_pixbuf_new_from_file (your_file)
if (gdk_pixbuf_has_alpha (gpb) {
gnome_print_rgbaimage (gpc,
gdk_pixbuf_get_pixels (gpb),
gdk_pixbuf_get_width (gpb),
gdk_pixbuf_get_height (gpb),
gdk_pixbuf_get_rowstride (gpb));
} else {
gnome_print_rgbimage...
}
The real thing is bit more complicated, as theoretically pixbufs can have
num_channels other than 3, different colorspaces and bits per channel
<> 8. But usually this works.
Lauris
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]