Re: write_png weirdness [message #51506] |
Thu, 23 November 2006 12:33 |
Bringfried Stecklum
Messages: 75 Registered: January 1996
|
Member |
|
|
F�LDY Lajos wrote:
>
> On Thu, 23 Nov 2006, Bringfried Stecklum wrote:
>
>> Hello,
>>
>> I noticed that in IDL 6.1.1 there is some weirdness related to the
>> write_png procedure. I have true colour image like
>>> print,size(hhh)
>>> 3 3 640 512 1 983040
>> which I want to save as a negative. However,
>>
>> write_png,'file',255-hhh
>>
>> results in a PNG file which is just black while
>>
>> write_png,'file',byte(255-hhh)
>>
>> does the right thing. This seems a bit strange since both, hhh and 255
>> are of type byte, and so should be the difference (without forcing it).
>
> 255 is INT (255b is BYTE).
>
> regards,
> lajos
>
Uhmm, again the type trap.Seems I was not fully awake yet. Thanks for
pointing out the obvious.
regards,
Bringfried
|
|
|
Re: write_png weirdness [message #51523 is a reply to message #51506] |
Thu, 23 November 2006 01:40  |
Foldy Lajos
Messages: 268 Registered: October 2001
|
Senior Member |
|
|
On Thu, 23 Nov 2006, Bringfried Stecklum wrote:
> Hello,
>
> I noticed that in IDL 6.1.1 there is some weirdness related to the write_png
> procedure. I have true colour image like
>> print,size(hhh)
>> 3 3 640 512 1 983040
> which I want to save as a negative. However,
>
> write_png,'file',255-hhh
>
> results in a PNG file which is just black while
>
> write_png,'file',byte(255-hhh)
>
> does the right thing. This seems a bit strange since both, hhh and 255 are of
> type byte, and so should be the difference (without forcing it).
255 is INT (255b is BYTE).
regards,
lajos
|
|
|