On 8/31/2010 4:36 PM, P Kishor wrote:
> even more bizarre...
>
> On Tue, Aug 31, 2010 at 1:14 PM, P Kishor<[email protected]> wrote:
>> On Tue, Aug 31, 2010 at 11:59 AM, P Kishor<[email protected]> wrote:
>>> On Tue, Aug 31, 2010 at 11:54 AM, Chris Marshall<[email protected]> wrote:
>>>>> 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.
>>>>
>>>> Actually the error is being trapped which is what
>>>> you have reported. The problem is that you have
>>>> bad values in the image data that you are trying
>>>> to save.
>>>>
>>>> If there is a problem with the current PDL
>>>> code, it may be that an error is *not* being given
>>>> for the non-LUT wpic() case.
>>>>
>>>> At any rate, the fix is to save image data *without*
>>>> bad values in them. I suggest using setbadtoval()
>>>> and then make that value in your color map special
>>>> (e.g., bright red so you can see the erroneous pixels).
So you didn't have any luck with:
pdl> $pdl->inplace->setbadtoval(255)
pdl> $lut->slice(':,(255)) .= pdl(255,0,0)
pdl> $pdl->wpic('nobadshere.png', { LUT=>$lut })
or whatever works for your case?
--Chris
> I added the appropriate commas to the above, and read them into $foo
> and $bar. Then I did
>
> $res = index($foo, $bar) and voila! That worked fine!
>
> So, there is something going on when I do the same in my code, but the
> output from my code re-read back into the code works fine.
>
> I will get to the bottom of this, if that is the last thing I do with PDL.
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl