A program was developed (on Delphi XE), takes pictures from the camera in bmp-format and all this goes to the act of printing. Everything works perfectly.
Software was tested: on Win7 64bit PC, on WinXP 32bit PC, on WinXP 32bit laptop.
But it was worth launching at the customer’s site (far from modern PCs, platforms still on DDR1, OS WinXP). How did neocho happen!
They all began to take not pictures, but green rectangles.
What is it, why is this happening? And how to fix it (bypass)?
——————
The picture is taken as follows:

begin //открываем камеру hWndC := capCreateCaptureWindowA('My Own Capture Window', WS_CHILD or WS_VISIBLE, Image1.Left, Image1.Top, Image1.Width, Image1.Height, Form1.Handle, //Image1.Canvas.Handle, //тут белое //Image1.Picture.Bitmap.Canvas.Handle, // тут пусто 0); if hWndC <> 0 then begin SendMessage(hWndC, WM_CAP_DRIVER_CONNECT, 0, 0); // подключаемся к драйверу SendMessage(hWndC, WM_CAP_SAVEDIB, 0, longint(PAnsiChar(AnsiString('data\photo.bmp')))); // делаем снимок SendMessage(hWndC, WM_CAP_DRIVER_DISCONNECT, 0, 0); //отключаемся от драйвера hWndC := 0; end; end; 
  • 2
    The camera has a lot of settings, eleven pieces. Brightness / contrast / other settings can be achieved: black square, white square, green square and other jokes - nick_n_a
  • one
    Perhaps the camera driver has become crooked or some codecs are missing. - kot-da-vinci
  • four
    @I_CaR, How is a camera shot taken? .. Isn't it from a monitor screen? If yes, then make sure that there is no image output on the overlay, because in this case, there is really only a green square, and the video image is superimposed by the video card after. Then you need to dig into the settings of the application for viewing images from the camera. - Alekcvp
  • one
    And it also happens if you try to set the camera parameters that it does not support. For example, we set the size to 1280x800, and she only knows how to 1024x768. - KoVadim
  • one
    @I_CaR, and the image from the camera in their program can be seen? There is simply a suspicion that they have not one capture driver in the system, therefore your camera has a driver index different from 0 and, accordingly, you are not capturing it. - Alekcvp

0