PPM image from IDLgrBuffer: top-bottom order [message #30423] |
Wed, 24 April 2002 14:34 |
Sean Dettrick
Messages: 12 Registered: April 2002
|
Junior Member |
|
|
Hi,
I'm trying to draw my view object to a PPM image file,
so that I can then do FLIC animation via ppm2fli.
In direct graphics it's easy to do this with:
wset,window_number
image = tvrd(true=1,/order)
write_ppm,'name.ppm',image
where top-bottom order is reversed to give an upside-up
PPM image.
In object graphics, I am stumped again. I've tried two
methods, but both times get an upside-down PPM, and
can't see a way to use /ORDER to fix the problem:
1) make image object from Buffer object:
; starting with this line obviously didn't help:
; image_obj=Obj_New('IDLgrImage',/order)
buffer=Obj_New('IDLgrBuffer',graphics_tree=thisView,$
dimensi=[400,400])
buffer-> Draw
image_obj = buffer -> Read()
image_obj -> SetProperty, /order ;; <- doesn't help!
image_obj -> GetProperty, data=image_dat
write_ppm,'name.ppm',image_dat
2) take image data direct from buffer object:
buffer=Obj_New('IDLgrBuffer',graphics_tree=thisView,$
dimensi=[400,400])
buffer -> Draw
buffer -> GetProperty, image_data=image_dat
write_ppm,'name.ppm',image_dat
By the way, there doesn't seem to be an option in ppm2fli
to automatically flip the input images.
Any advice greatly appreciated!
Thanks,
Sean Dettrick
Physics Dept,
UC Irvine
|
|
|