diff options
Diffstat (limited to 'plugins/dexela/software-roi.c')
-rw-r--r-- | plugins/dexela/software-roi.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/dexela/software-roi.c b/plugins/dexela/software-roi.c new file mode 100644 index 0000000..74baa96 --- /dev/null +++ b/plugins/dexela/software-roi.c @@ -0,0 +1,12 @@ +#include "software-roi.h" +#include <string.h> + +void apply_software_roi(const guchar* src, guint srcWidth, guchar* dest, guint x, guint y, guint roiWidth, guint roiHeight) +{ + for (guint row = 0; row < roiHeight; row++) { + guint rowOffset = srcWidth * (y + row); + guint offset = rowOffset + x; + memcpy(dest + row * roiWidth, src + offset, roiWidth); + } +} + |