• # XYPixmap

    Posté par . En réponse au message XLib: XGetImage sur une Window. Évalué à 6.

    Hello,

    et le message retourné lors de l’exécution:

    X Error of failed request: BadValue (integer parameter out of range for operation)
    Major opcode of failed request: 73 (X_GetImage)
    Value in failed request: 0x0
    Serial number of failed request: 9
    Current serial number in output stream: 9

    Et, dans la man page :

     BadValue Some numeric value falls outside the range of values accepted by the request.
     Unless a specific range is specified for an argument, the full range defined by the
     argument's type is accepted. Any argument defined as a set of alternatives can generate this error.
    

    Dans ton code, on voit :

    XImage * image = XGetImage(_display, _window, 0,0, winAttr.width,winAttr.height, 0x00FFFFFF, XYBitmap);
    
    

    et la man page précise :

     format Specifies the format for the image. You can pass XYPixmap or ZPixmap.
    
    

    Essaie donc de remplacer XYBitmap par XYPixmap.