Need help with Python X REBOL Code
[1/2] from: carloslorenz::rebolbrasil::nobrenet::com at: 11-Aug-2004 8:13
Hello Python users
I need to write some piece of code in REBOL
that communicates to MPlayer via FIFO (pipe) the same
way as in the python code bellow that uses
PIL (Python Image Library):
# python code
import Image, os
fifo = os.open("/tmp/mplayer.fifo", os.O_RDWR)
img = Image.open("file.png")
os.write("RGBA32 %d %d 0 0 255 0\n" % (img.size[0], img.size[1]))
os.write(img.convert("RGBA").tostring())
What are the same functions in REBOL that could give me
the possibilities of get the width of an image, its height and
most how could I send to the pipe the RAW RGB data?
Thanks
Carlos
[2/2] from: gabriele:colellachiara at: 11-Aug-2004 15:27
Hi Carlos,
On Wednesday, August 11, 2004, 1:13:28 PM, you wrote:
CL> What are the same functions in REBOL that could give me
CL> the possibilities of get the width of an image, its height and
CL> most how could I send to the pipe the RAW RGB data?
>> type? logo.gif
== image!
>> logo.gif/size
== 100x24
>> logo.gif/rgb
== #{
2525251414141414141414141414141414141414141414141414141414141414
141414141414141414141414141414141414141414141414141414141414...
>> logo.gif/alpha
== #{
0000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000...
>> to binary! logo.gif
== #{
0025252500141414001414140014141400141414001414140014141400141414
001414140014141400141414001414140014141400141414001414140014...
(The latter is ARGB.)
Regards,
Gabriele.
--
Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer
Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/