@@ -791,16 +791,16 @@ namespace webots {
791791from controller import Camera
792792
793793class Camera (Device ):
794- def getImage (self ):
795- def getImageArray (self ):
794+ def getImage (self ) -> bytes :
795+ def getImageArray (self ) -> list[list[list[ int ]]] :
796796 @ staticmethod
797- def imageGetRed (image , width , x , y ) :
797+ def imageGetRed (image : bytes , width : int , x : int , y : int ) -> int :
798798 @ staticmethod
799- def imageGetGreen (image , width , x , y ) :
799+ def imageGetGreen (image : bytes , width : int , x : int , y : int ) -> int :
800800 @ staticmethod
801- def imageGetBlue (image , width , x , y ) :
801+ def imageGetBlue (image : bytes , width : int , x : int , y : int ) -> int :
802802 @ staticmethod
803- def imageGetGray (image , width , x , y ) :
803+ def imageGetGray (image : bytes , width : int , x : int , y : int ) -> int :
804804 # ...
805805```
806806
@@ -895,8 +895,8 @@ Here is an example:
895895
896896<!-- -->
897897
898- > **Note** [Python]: The `getImage` function returns a `string` .
899- This `string ` is closely related to the `const char *` of the C API.
898+ > **Note** [Python]: The `getImage` function returns a byte array (`bytes`) .
899+ This `bytes ` is closely related to the `const char *` of the C API.
900900`imageGet*`-like functions can be used to get the channels of the camera Here is an example:
901901
902902> ```python
0 commit comments