| View previous topic :: View next topic |
| Author |
Message |
Ricardo Oliveira Guest
|
Posted: Wed Nov 26, 2003 11:14 am Post subject: Screen to stream |
|
|
Hi!
Is it possible to send the image seen by the user (on the screen) to a
stream and then send it to another pc over the network?
Thanks in advance.
Ricardo Oliveira
|
|
| Back to top |
|
 |
Jens Gruschel Guest
|
Posted: Wed Nov 26, 2003 2:54 pm Post subject: Re: Screen to stream |
|
|
| Quote: | Is it possible to send the image seen by the user (on the screen) to a
stream and then send it to another pc over the network?
|
Yes :-)
If you need to capture the screen content first, search for a capturing
routine. Once you have a bitmap, set its PixelFormat to pf24bit or something
that fits your needs. Now you can access the pixel data using
TBitmap.ScanLine, it should be rather simple to write the single lines to a
stream (use TStream.Write method). The number of bytes for each line depends
on the pixel format (3*Width for pf24bit).
Jens
P.S. I think this questions better fits to the graphics newsgroup. If you
have more questions, post them there.
|
|
| Back to top |
|
 |
Rob Kennedy Guest
|
Posted: Wed Nov 26, 2003 3:40 pm Post subject: Re: Screen to stream |
|
|
Jens Gruschel wrote:
| Quote: | Now you can access the pixel data using TBitmap.ScanLine, it should
be rather simple to write the single lines to a stream (use
TStream.Write method).
|
TGraphic.SaveToStream comes to mind.
--
Rob
|
|
| Back to top |
|
 |
Jens Gruschel Guest
|
Posted: Thu Nov 27, 2003 12:02 pm Post subject: Re: Screen to stream |
|
|
| Quote: | Now you can access the pixel data using TBitmap.ScanLine, it should
be rather simple to write the single lines to a stream (use
TStream.Write method).
TGraphic.SaveToStream comes to mind.
|
Sometimes my thoughts are too wired :-)
Jens
|
|
| Back to top |
|
 |
|