lib/imlib: Add deep copy flag to image_copy.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
This commit is contained in:
iabdalkader 2025-06-25 21:11:24 +02:00
parent 1c47d9bcf0
commit c7d84b8ca5
2 changed files with 2 additions and 2 deletions

View File

@ -284,7 +284,7 @@ void image_init(image_t *ptr, int w, int h, pixformat_t pixfmt, uint32_t size, v
ptr->pixels = pixels;
}
void image_copy(image_t *dst, image_t *src) {
void image_copy(image_t *dst, image_t *src, bool deep) {
memcpy(dst, src, sizeof(image_t));
}

View File

@ -570,7 +570,7 @@ typedef struct image {
void image_xalloc(image_t *img, size_t size);
void image_xalloc0(image_t *img, size_t size);
void image_init(image_t *ptr, int w, int h, pixformat_t pixfmt, uint32_t size, void *pixels);
void image_copy(image_t *dst, image_t *src);
void image_copy(image_t *dst, image_t *src, bool deep);
size_t image_line_size(image_t *ptr);
size_t image_size(image_t *ptr);
bool image_get_mask_pixel(image_t *ptr, int x, int y);