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 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: PPM image from IDLgrBuffer: top-bottom order [message #30404] Thu, 25 April 2002 19:31
Sean Dettrick is currently offline  Sean Dettrick
Messages: 12
Registered: April 2002
Junior Member
Thanks David, Thanks Rick, much obliged.

I wrote a bash script to flip the PPM using
imagemagick convert -flip, but it's nicer to
do it all in IDL.

Cheers,
Sean


Rick Towler wrote:
>
> Depending on your hardware you might consider grabbing your images from your
> window instead of a buffer. Most of the newer mid to high end PC video
> adapters allow you to display anti-aliased output which is far superior to
> the output rendered in a buffer. Which makes me wonder if scenes rendered
> to a buffer are rendered via software?
>
> Just don't do anything with your machine while you are generating your
> images in this manner since anything parked in the window's space while you
> are "recording" will be grabbed.
>
> This should improve image quality, even if you are reducing to 8 bit flick
> files.
>
> -Rick
Re: PPM image from IDLgrBuffer: top-bottom order [message #30409 is a reply to message #30404] Thu, 25 April 2002 13:30 Go to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
Depending on your hardware you might consider grabbing your images from your
window instead of a buffer. Most of the newer mid to high end PC video
adapters allow you to display anti-aliased output which is far superior to
the output rendered in a buffer. Which makes me wonder if scenes rendered
to a buffer are rendered via software?

Just don't do anything with your machine while you are generating your
images in this manner since anything parked in the window's space while you
are "recording" will be grabbed.

This should improve image quality, even if you are reducing to 8 bit flick
files.

-Rick
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
  Switch to threaded view of this topic Create a new topic Submit Reply
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: Wed Oct 08 13:39:23 PDT 2025

Total time taken to generate the page: 0.00642 seconds