Re: Writing mpeg from IDL (pseudo_to_true included) [message #7404] |
Wed, 13 November 1996 00:00  |
A. Scott Denning
Messages: 5 Registered: July 1996
|
Junior Member |
|
|
Here is the simple procedure "pseudo_to_true", which I neglected to post
along with the write_mpeg procedure:
FUNCTION pseudo_to_true, image8
s = SIZE(image8)
IF s(0) NE 2 THEN BEGIN
MESSAGE, 'input array must be 2D BYTE array.'
RETURN, -1
ENDIF
width = s(1)
height = s(2)
; Load current color table into byte arrays
TVLCT, red, green, blue, /GET
image24 = BYTARR(3,width, height)
image24(0,*,*) = red(image8(*,*))
image24(1,*,*) = green(image8(*,*))
image24(2,*,*) = blue(image8(*,*))
RETURN, image24
END
|
|
|
Re: Writing mpeg from IDL (pseudo_to_true included) [message #7486 is a reply to message #7404] |
Fri, 15 November 1996 00:00  |
sterner
Messages: 106 Registered: February 1991
|
Senior Member |
|
|
"A. Scott Denning" <scott@abyss.atmos.colostate.edu> writes:
> Here is the simple procedure "pseudo_to_true", which I neglected to post
> along with the write_mpeg procedure:
. . .
> image24(0,*,*) = red(image8(*,*))
> image24(1,*,*) = green(image8(*,*))
> image24(2,*,*) = blue(image8(*,*))
Try the following simple change and see if it speeds things up a bit:
image24(0,0,0) = red(image8)
image24(1,0,0) = green(image8)
image24(2,0,0) = blue(image8)
Do a timing test in a loop and compare the two variations.
Ray Sterner sterner@tesla.jhuapl.edu
The Johns Hopkins University North latitude 39.16 degrees.
Applied Physics Laboratory West longitude 76.90 degrees.
Laurel, MD 20723-6099
WWW Home page: http://fermi.jhuapl.edu/s1r/people/res/res.html
|
|
|