modules/py_image: Export py_image_type for use by other modules.

This commit is contained in:
iabdalkader 2024-06-22 12:58:04 +02:00
parent 76a17f81c9
commit 073b161309
2 changed files with 3 additions and 2 deletions

View File

@ -35,7 +35,7 @@
#include "py_imageio.h"
#endif
static const mp_obj_type_t py_image_type;
const mp_obj_type_t py_image_type;
#if defined(IMLIB_ENABLE_IMAGE_FILE_IO)
extern const char *ffs_strerror(FRESULT res);
@ -6492,7 +6492,7 @@ static const mp_rom_map_elem_t locals_dict_table[] = {
STATIC MP_DEFINE_CONST_DICT(py_image_locals_dict, locals_dict_table);
STATIC MP_DEFINE_CONST_OBJ_TYPE(
MP_DEFINE_CONST_OBJ_TYPE(
py_image_type,
MP_QSTR_Image,
MP_TYPE_FLAG_ITER_IS_GETITER,

View File

@ -11,6 +11,7 @@
#ifndef __PY_IMAGE_H__
#define __PY_IMAGE_H__
#include "imlib.h"
extern const mp_obj_type_t py_image_type;
mp_obj_t py_image(int width, int height, pixformat_t pixfmt, uint32_t size, void *pixels);
mp_obj_t py_image_from_struct(image_t *img);
void *py_image_cobj(mp_obj_t img_obj);