Mauricio, On my example, the map pointer must be PChar. After all the "map" is filled with 3 bytes sequences like BGR, so we have to switch to RGB and bring this data to a Timage object. Lik this: (...) m_buf: video_mbuf; map: PChar; //<= Was..: <<map: Pointer>>, but now must be PChar; v_map: video_mmap; VideoBuffer: video_buffer; (...) To switch BGR to RGB use this: for i:=0 To iSize Do //iSize is size of buffer: Height*Width*Depth/8 Begin c:=map[x]; map[x]:=map[x+2]; map[x+2]:=c; x:=x+3 End; ----------- I think with these tests we will get some positive news... PS: Acho que devemos nos falar em portugues ou espanhol somente fora da lista, pois pode ser possivel que alguem mais esteja com a mesma necessidade que nos e nao saiba espanhol ou portugues. ~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^ Rafael Franco Carvalho Programador de Sistemas Thermas Di Roma Hotel Clube .:¨:..:¨:..:¨:..:¨:..:¨:..:¨:..:¨:..:¨:..:¨:..:¨:..:¨:..:¨:..:¨:. www.diroma.com.br rafael.franco@xxxxxxxxxxxxx rafael@xxxxxxxxxxx rafranco@xxxxxxxxxxxxx ICQ: 43967202 MSN: rafaelfrancocarvalho@xxxxxxxxxxx Caldas Novas - Goiás - Brasil ~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^ ----- Original Message ----- From: "Mauricio Henriquez" <buho-1@xxxxxxxxxxxxxx> To: <video4linux-list@xxxxxxxxxx> Sent: Friday, May 16, 2003 5:20 PM Subject: Re: Video4Linux with Kylix > Rafael: > > Hola, encontre dentro de mis archivos de "tips" para delphi este > procedimiento que carga un bitmap desde la memoria, claro que esta > especificado para la API de windows pero puede ser un punto de partida > > > procedure TForm1.Button1Click(Sender: TObject); > var > dc : hdc; > MemDc : hdc; > MemBitmap : hBitmap; > OldMemBitmap : hBitmap; > begin > > {Get the handle to the screen's dc} > dc := GetDc(0); > > {Create and retrieve a handle to a memory dc based on the screen} > MemDc := CreateCompatibleDc(dc); > > {Create a bitmap that is compatible with the display.} > {Note: if you pass "MemDc" to CreateCompatibleBitmap()} > {instead of "dc", you will get a monochrome bitmap!} > MemBitmap := CreateCompatibleBitmap(dc, 100, 100); > > {Release the screen dc} > ReleaseDc(0, dc); > > {Select the bitmap surface into the MemDc} > {remembering the default bitmap} > OldMemBitmap := SelectObject(MemDc, MemBitmap); > > {Draw on the MemoryDc} > PatBlt(MemDc, 0, 0, 100, 100, WHITENESS); > Ellipse(MemDc, 0, 0, 100, 100); > > {Copy the MemDc to the Form Canvas} > BitBlt(Form1.Canvas.Handle, > 100, 100, > 100, 100, > MemDc, > 0, 0, > SRCCOPY); > > {Select the default bitmap back into the memory dc} > SelectObject(MemDc, OldMemBitmap); > > {Note: You can now use the memory bitmap handle with} > {functions such as GetDiBits()} > > {Delete the Memory Bitmap} > DeleteObject(MemBitmap); > > {Delete the MemoryDc} > DeleteDc(MemDc); > > end; > > On Fri, 2003-05-16 at 13:56, Rafael Franco Carvalho wrote: > > Mauricio Henriquez, > > > > Finally I found somebody that has the same necessities that I. > > > > Thanks for reply > > > > > what kylix and linux you are using?? > > I'm working with Kylix 3, RedHat 9 and a Logitech USB WebCam. > > > > I'll send the source code of videodev.pas and my simple test that doesn't > > work yet > > :( > > > > I'll be glad if you can help me. > > > > Regards, > > > > PS: Voce fala portugues ou espanhol? > > > > ~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^ > > Rafael Franco Carvalho > > Programador de Sistemas > > Thermas Di Roma Hotel Clube > > .:¨:..:¨:..:¨:..:¨:..:¨:..:¨:..:¨:..:¨:..:¨:..:¨:..:¨:..:¨:..:¨:. > > www.diroma.com.br > > rafael.franco@xxxxxxxxxxxxx > > rafael@xxxxxxxxxxx > > rafranco@xxxxxxxxxxxxx > > ICQ: 43967202 > > MSN: rafaelfrancocarvalho@xxxxxxxxxxx > > Caldas Novas - Goiás - Brasil > > ~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^ > > > > ----- Original Message ----- > > From: "Mauricio Henriquez" <buho-1@xxxxxxxxxxxxxx> > > To: <video4linux-list@xxxxxxxxxx> > > Sent: Wednesday, May 14, 2003 4:04 PM > > Subject: Re: Video4Linux with Kylix > > > > > > > Hi, > > > I try to to work with kylix and v4l but you are much more advanced > > that > > > me. If you like, please send me you videodev.pas and I help you to > > > investigate and test how to work with this. > > > what kylix and linux you are using?? > > > > > > Bye > > > > > > ----- Original Message ----- > > > From: "Rafael Franco Carvalho" <rafael@xxxxxxxxxxx> > > > To: <video4linux-list@xxxxxxxxxx> > > > Sent: Wednesday, May 14, 2003 7:22 AM > > > Subject: Video4Linux with Kylix > > > > > > > > > > Hi, > > > > > > > > Is somebody working with v4l on Borland Kylix? I need capture images in > > my > > > > Kylix project using video4linux. > > > > I translated videodev.h to videodev.pas (Pascal/Kylix version). I can > > open > > > > device but when I start capture I allways get -1 result from ioctl. > > > > I need the correct steps for: open device, start capture, send the image > > > > buffer to a window, finish capture, close device. > > > > > > > > Please help me! > > > > > > > > Thanks, > > > > > > > > ~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^ > > > > Rafael Franco Carvalho > > > > Programador de Sistemas > > > > Thermas Di Roma Hotel Clube > > > > .:¨:..:¨:..:¨:..:¨:..:¨:..:¨:..:¨:..:¨:..:¨:..:¨:..:¨:..:¨:..:¨:. > > > > www.diroma.com.br > > > > rafael.franco@xxxxxxxxxxxxx > > > > rafael@xxxxxxxxxxx > > > > rafranco@xxxxxxxxxxxxx > > > > ICQ: 43967202 > > > > MSN: rafaelfrancocarvalho@xxxxxxxxxxx > > > > Caldas Novas - Goiás - Brasil > > > > ~^~^~^~^~^~^~^~^~^~^~^~^~^~^~^ > > > > > > > > > > > > > > > > -- > > > > video4linux-list mailing list > > > > Unsubscribe > > mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe > > > > https://www.redhat.com/mailman/listinfo/video4linux-list > > > > > > > > > > > > > -- > > > video4linux-list mailing list > > > Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe > > > https://www.redhat.com/mailman/listinfo/video4linux-list > > > > -- > video4linux-list mailing list > Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe > https://www.redhat.com/mailman/listinfo/video4linux-list >