Re: PNG IMAGE [message #66704] |
Wed, 03 June 2009 09:47 |
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  |
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  |
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.")
|
|
|