On Tue, Aug 31, 2010 at 10:23 AM, Chris Marshall <[email protected]> wrote:
> Try 'help index' in the pdl2 shell and take
> a look at the last line. You'll need to use
> a mask or some such.
Hi Chris,
I am failing in explaining this properly, I guess. The code I gave is
not my code. It is the code in ImageRGB, simply replicated by me.
Originally, my code was simply
$pdl->wpic($file, {LUT => $lut});
Where $pdl is a 'PDL: Byte D [252,189]' and $lut is a 'PDL: Byte D [3, 256]'
That is all. Just that line results in the 'PDL::index: invalid index
-2147483648 (valid range 0..255)' error.
If I take away the LUT part from my code so that my command is simply
`$pdl->wpic($file)` it works just fine.
The rest is just my attempt to figure out what is causing the error. I
have narrowed the error to line 166 in ImageRGB.pm
166> $res = $lut->xchg(0,1)->index($pdl->dummy(0))->sever;
It is the $res that is croaking. $res should be a piddle, but is not.
Once $res is made, that sub PDL::interlrgb() returns $res at line 168,
and the next step dies... I think the next step is in Pnm.pm.
I would love to learn that I am doing something stupid, but I am
fairly convinced that there is either a bug or an untrapped error in
the PDL code.
--
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
-----------------------------------------------------------------------
Assertions are politics; backing up assertions with evidence is science
=======================================================================
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl