Re: PPM image from IDLgrBuffer: top-bottom order [message #30404] |
Thu, 25 April 2002 19:31 |
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  |
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  |
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
|
|
|