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

Home » Public Forums » archive » Re: PPM image from IDLgrBuffer: top-bottom order
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: PPM image from IDLgrBuffer: top-bottom order [message #30419 is a reply to message #30409] Wed, 24 April 2002 20:09 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Sean Dettrick (dettrick@uci.edu) writes:

> 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.
>
> 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!

I'd use the REVERSE function like this:

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', Reverse(image_dat,3)

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Art and all that Jazz: her fig was strong, poor, and nibbles near the corner
Next Topic: Same color: graph and errorbars

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

Current Time: Fri Oct 10 01:20:15 PDT 2025

Total time taken to generate the page: 0.79862 seconds