Re: [gtk-list] Re: [perl] example for create_from_data?
- From: Robert Schwebel <robert schwebel de>
- To: Etienne Grossmann <etienne isr isr ist utl pt>
- cc: gtk-list redhat com
- Subject: Re: [gtk-list] Re: [perl] example for create_from_data?
- Date: Thu, 24 Feb 2000 14:49:12 +0100 (CET)
Hello Etienne,
On Thu, 24 Feb 2000, Etienne Grossmann wrote:
> =====================================================
> sub pdlgrey_to_imlib_img {
> my $pdl = shift;
> my $grey_lut = shift || sequence(256)->transpose * pdl [1,1,1];
> my $rgb = $pdl->slice(":,-1:0")->interlrgb($grey_lut)->byte;
> $rgb->make_physical;
> return Gtk::Gdk::ImlibImage->create_image_from_data(${$rgb->get_dataref},
> undef,
> $pdl->dims);
> }
> and his page : http://imagic.weizmann.ac.il/~dov/freesw/MakeRoi/
> might interest you too.
I've seen both of them, but each uses Imlib (and I don't want to be
dependend on Imlib if possible - there are Imlib, Imlib2 and GtkPixBuf at
the moment for the same thing, and nobody knows which of them will still
exist in a year :-( ). I think it will be similar with
Gtk::Gdk::Pixmap->create_from_data() but coudln't find out how exactly it
has to be done.
Cheers,
Robert
--
+----------------------------------------------------------+
Robert Schwebel, Luedemannstrasse 25, 24114 Kiel, Germany
Public Observatory Rothwesten (near Kassel, Germany)
Phone: +49-431-6794138, email: robert@schwebel.de
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]