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

Home » Public Forums » archive » Re: PNG IMAGE
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: PNG IMAGE [message #66704] Wed, 03 June 2009 09:47
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
nata writes:

> I forget to define the view_plane rectangle. Now I see the results

Ah, that big pixel in the sky. I remember it fondly! :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: PNG IMAGE [message #66705 is a reply to message #66704] Wed, 03 June 2009 09:32 Go to previous message
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
On Jun 3, 9:37 am, David Fanning <n...@dfanning.com> wrote:
> nata writes:
>> I'm trying to read a PNG image and visualize it in an IDLgrImage. I
>> can not do it and I don't know why. Normally, I do something like
>> this:
>
>> image=READ_PNG('my_image.png',red,green,blue)
>> oPalette = OBJ_NEW('IDLgrPalette', red, green, blue)
>> oImage = OBJ_NEW('IDLgrImage', image, PALETTE = oPalette)
>
>> It works but my problem now is that I can not retrieve the red, green
>> and blue channels from the image, so:
>
>> image=READ_PNG('my_image.png',red,green,blue)
>> help
>
>> image BYTE = Array[3, 24, 24]
>> blue UNDEFINED = <Undefined>
>> green UNDEFINED = <Undefined>
>> red UNDEFINED = <Undefined>
>
>> How can I display this image in OBJECT GRAPHICS ?
>
> Your red, green, and blue channels are IN your image.
> That's what the "3" is all about. Just put this image
> in your IDLgrImage and you are finished. :-)
>
> Cheers,
>
> David

TX ! :P
I forget to define the view_plane rectangle. Now I see the results
Thanks,
Bernat
Re: PNG IMAGE [message #66711 is a reply to message #66705] Wed, 03 June 2009 06:37 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
nata writes:

> I'm trying to read a PNG image and visualize it in an IDLgrImage. I
> can not do it and I don't know why. Normally, I do something like
> this:
>
> image=READ_PNG('my_image.png',red,green,blue)
> oPalette = OBJ_NEW('IDLgrPalette', red, green, blue)
> oImage = OBJ_NEW('IDLgrImage', image, PALETTE = oPalette)
>
> It works but my problem now is that I can not retrieve the red, green
> and blue channels from the image, so:
>
> image=READ_PNG('my_image.png',red,green,blue)
> help
>
> image BYTE = Array[3, 24, 24]
> blue UNDEFINED = <Undefined>
> green UNDEFINED = <Undefined>
> red UNDEFINED = <Undefined>
>
> How can I display this image in OBJECT GRAPHICS ?

Your red, green, and blue channels are IN your image.
That's what the "3" is all about. Just put this image
in your IDLgrImage and you are finished. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: PNG IMAGE
Next Topic: Re: Non-monotonic Abscissa values for IDL function SPLINE_P

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

Current Time: Fri Oct 10 09:10:44 PDT 2025

Total time taken to generate the page: 1.04056 seconds