On 8/30/2010 9:23 AM, P Kishor wrote:
> pdl> p $a
> [
> [0 0 4 0 3]
> [2 0 2 2 0]
> [1 3 0 3 1]
> [4 2 2 4 1]
> ]
> pdl> p $lut
> [
> [ 0 0 0]
> [ 0 0 20]
> [ 0 0 40]
> [ 0 0 60]
> [ 0 0 80]
> ]
> pdl> wpic $a, 'foo.tif', {LUT => $lut}
> PDL::index: invalid index 255 (valid range 0..4) at
> /usr/local/lib/perl5/site_perl/5.12.1/darwin-2level/PDL/ImageRGB.pm
> line 147.
RGB lookup tables for 1-byte per channel are [3,256]
piddles, not [3,5].
>> From the wpic docs
>
> pdl> help wpic
> "..LUT This is a palette image and the value of this key should be a pdl
> containg an RGB lookup table (3,x), e.g.
>
> LUT => $lut,.."
>
> I assuming the above means a [3, x] piddle where every row is a 3
> element piddle with rgb values.
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl