Re: [gtk-list] Re: [perl] example for create_from_data?

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 :
> 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.

  Robert Schwebel, Luedemannstrasse 25, 24114 Kiel, Germany 
    Public Observatory Rothwesten  (near Kassel, Germany)   
      Phone: +49-431-6794138, email:     

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