Better Document PixelPolicy and the pixel_policy argument
This commit is contained in:
parent
e5a57d2399
commit
0fbe56c915
|
@ -54,8 +54,8 @@ STATIC mp_obj_t qrio_qrdecoder_make_new(const mp_obj_type_t *type, size_t n_args
|
|||
return self;
|
||||
}
|
||||
|
||||
//| def decode(self, buffer: ReadableBuffer) -> List[QRInfo]:
|
||||
//| """Decode zero or more QR codes from the given image in L8 format"""
|
||||
//| def decode(self, buffer: ReadableBuffer, pixel_policy: PixelPolicy = PixelPolicy.EVERY_BYTE) -> List[QRInfo]:
|
||||
//| """Decode zero or more QR codes from the given image"""
|
||||
//|
|
||||
STATIC mp_obj_t qrio_qrdecoder_decode(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
|
||||
qrio_qrdecoder_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]);
|
||||
|
|
|
@ -35,14 +35,14 @@
|
|||
//|
|
||||
|
||||
//| class PixelPolicy:
|
||||
//| EVERY_BYTE: object
|
||||
//| EVERY_BYTE: PixelPolicy
|
||||
//| """The input buffer to `QRDecoder.decode` consists of greyscale values in every byte"""
|
||||
//|
|
||||
//| EVEN_BYTES: object
|
||||
//| """The input buffer to `QRDecoder.decode` consists of greyscale values in positions 0, 2, ..., and ignored bytes in positions 1, 3, ..."""
|
||||
|
||||
//| ODD_BYTES: object
|
||||
//| """The input buffer to `QRDecoder.decode` consists of greyscale values in positions 1, 3, ..., and ignored bytes in positions 0, 2, ..."""
|
||||
//| EVEN_BYTES: PixelPolicy
|
||||
//| """The input buffer to `QRDecoder.decode` consists of greyscale values in positions 0, 2, …, and ignored bytes in positions 1, 3, …. This can decode directly from YUV images where the even bytes hold the Y (luminance) data."""
|
||||
//|
|
||||
//| ODD_BYTES: PixelPolicy
|
||||
//| """The input buffer to `QRDecoder.decode` consists of greyscale values in positions 1, 3, …, and ignored bytes in positions 0, 2, …. This can decode directly from YUV images where the odd bytes hold the Y (luminance) data"""
|
||||
//|
|
||||
|
||||
MAKE_ENUM_VALUE(qrio_pixel_policy_type, qrio_pixel_policy, EVERY_BYTE, QRIO_EVERY_BYTE);
|
||||
|
|
Loading…
Reference in New Issue