Re: JPG Image in print context

On Thu, 2005-04-28 at 11:52 -0300, ADIS - CPD wrote:

To which you must pass the pixel buffer (255 value marking and one-byte
per pixel, three-byte per pixel and four-byte per pixel, respectively).
So, you must convert a JPEG image to the appropriate buffer (using

Whats the format of pack to covert it?

Okay, I'm officially drunk (without even touching a beer in 24...
erhm... 12 hours! That ought to be a record!)

Printing a RGB(A) image is as simple as this:

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) {
else                    {

It could be interesting to write an example.


Emmanuele Bassi <ebassi gmail com>
Web site:

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]