diff options
author | kdx <kikoodx@paranoici.org> | 2023-07-25 01:32:26 +0200 |
---|---|---|
committer | kdx <kikoodx@paranoici.org> | 2023-07-25 01:32:26 +0200 |
commit | a853d39c8e12674d60bafd7225d55eccd444e2b9 (patch) | |
tree | 5540814d541197c9789dbfb635421eda3c18cb6c | |
parent | 1984f60480a050e16f671dbbb18922a90d7a9b1a (diff) | |
download | catgy-a853d39c8e12674d60bafd7225d55eccd444e2b9.tar.gz |
-rw-r--r-- | catgy.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -74,10 +74,16 @@ average(uint8_t dest[3], uint8_t src[9]) static void blurge(struct image *img) { + struct image copy; + if (duplicate(©, img)) + return; + for (int y = 0; y < img->h; y++) for (int x = 1; x < img->w - 1; x++) average(&img->data[x * 3 + y * img->w * 3], - &img->data[x * 3 - 3 + y * img->w * 3]); + ©.data[x * 3 - 3 + y * img->w * 3]); + + free(copy.data); } static int |