help with write_gif - Image must be a byte matrix. [message #90964] |
Tue, 19 May 2015 07:21  |
g.nacarts
Messages: 148 Registered: November 2013
|
Senior Member |
|
|
Hi I have a 3D array, Image=[time,dimension_x,dimension_y]
I wrote the following code
for i=0L,n-1 do begin
im = reform(image[i,*,*])
im = BYTSCL(im, max=200.)
write_gif, im, file, /multiple
endfor
write_gif, file, /close
and I got this error: WRITE_GIF: Image must be a byte matrix. I used the BYTSCL function to convert my array to byte matrix but seems I am doing something wrong. Can anyone help?
|
|
|
Re: help with write_gif - Image must be a byte matrix. [message #90965 is a reply to message #90964] |
Tue, 19 May 2015 07:36   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
g.nacarts@gmail.com writes:
> Hi I have a 3D array, Image=[time,dimension_x,dimension_y]
>
> I wrote the following code
>
> for i=0L,n-1 do begin
> im = reform(image[i,*,*])
> im = BYTSCL(im, max=200.)
> write_gif, im, file, /multiple
> endfor
> write_gif, file, /close
>
> and I got this error: WRITE_GIF: Image must be a byte matrix. I used the BYTSCL function to convert my array to byte matrix but seems I am doing something wrong. Can anyone help?
Check the order of your arguments. You have them reversed, it looks
like.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|
|
|
|