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

Home » Public Forums » archive » Re: Writing mpeg from IDL (pseudo_to_true included)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Writing mpeg from IDL (pseudo_to_true included) [message #7404] Wed, 13 November 1996 00:00 Go to next message
A. Scott Denning is currently offline  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 Go to previous message
sterner is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: self programming IDL needed?
Next Topic: converting a gif file to a postscipt file

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

Current Time: Sat Oct 11 08:06:12 PDT 2025

Total time taken to generate the page: 0.63898 seconds