Re: [gtk-list] Re: [perl] example for create_from_data?
- From: Etienne Grossmann <etienne isr isr ist utl pt>
- To: gtk-list redhat com, robert schwebel de
- Subject: Re: [gtk-list] Re: [perl] example for create_from_data?
- Date: Thu, 24 Feb 2000 09:03:42 GMT
Hello,
you may try this code, which was sent to me by Dov Grobgeld :
=====================================================
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.
Hth,
Etienne
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]