comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Function BYTSCL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Function BYTSCL [message #24627] Tue, 10 April 2001 18:20 Go to previous message
marc schellens[1] is currently offline  marc schellens[1]
Messages: 183
Registered: January 2000
Senior Member
Steffen Kernchen wrote:
>
>> Of course you can do by hand something similar what bytscl does:
>>
>> lets say your array is 'a'
>>
>> minA=min(a,MAX=maxA)
>> a=a-minA
>> a=byte(float(a)/maxA*255)
>>
>> (2nd line is 'optional')
>
> when I use the 2nd line, then there is no picture displayed!
> if I don�t write this line I see a pic, that is only brighter. There is no
> more contrast. :(
>
>> but why you should not use bytarr?
>> Only point I can guess is that you have 8bit color and dont want to
>> use all colors?
>
> no, it�s an exercise, so that we learn, what BYTSCL does.
>
> I 've a pic and I read it with READ_BMP to get an array. that array I have
> to transform to get a better contrast.
> but unfortunately without using BYTSCL... :(
>
> cheers,
>
> steffen
Sorry, 2nd and 3rd line should read:

a=a-minA
a=byte(float(a)/(maxA-minA)*255)
*****
then it should work.
Its almost the same as bytscl with its default settings.
But strange that you don't see any picture with the old 2nd line.
Probably you just see a very dark one.
Cheers,
marc
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: sec : U Re: Dual head displays
Next Topic: Re: Error on shutdown of widget !@$%

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:46:38 PDT 2025

Total time taken to generate the page: 0.00440 seconds