[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: JPG Image in print context
- From: "ADIS - CPD" <jorge adis com br>
- To: "Emmanuele Bassi" <ebassi gmail com>
- Cc: gtk-perl-list gnome org
- Subject: Re: JPG Image in print context
- Date: Thu, 28 Apr 2005 16:01:20 -0300
> Printing a RGB(A) image is as simple as this:
>
> $context->beginpage('1');
> my $pixbuf = Gtk2::Gdk::Pixbuf->new_from_file('pr0n.jpg');
> # move to the desidered place on the paper, barring paper margins, scale
> # and translate, whistle twice and give a kiss to whoever is nearest to
> # you.
> if ($pixbuf->get_has_alpha) {
> $context->rgbaimage($pixbuf->get_pixels,
> $pixbuf->get_width,
> $pixbuf->get_height,
> $pixbuf->get_rowstride);
> }
> else {
> $context->rgbimage($pixbuf->get_pixels,
> $pixbuf->get_width,
> $pixbuf->get_height,
> $pixbuf->get_rowstride);
> }
> $context->showpage;
I tested. This doesn't work at all
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]