42 return memcpy(dest, src, width*height*szof);
52 for(
size_t rr=0; rr< height; ++rr)
54 memcpy((
char *)dest + rr*width*szof, (
char *)src + (height-1-rr)*width*szof, width*szof);
69 uint8_t * d = (uint8_t *) dest;
70 uint8_t * s = (uint8_t *)src;
71 for(
size_t rr=0; rr< height; ++rr)
73 for(
size_t cc=0; cc<width; ++cc)
75 d[rr*width + cc] = s[rr*width + (width-1-cc)];
81 uint16_t * d = (uint16_t *) dest;
82 uint16_t * s = (uint16_t *) src;
83 for(
size_t rr=0; rr< height; ++rr)
85 for(
size_t cc=0; cc<width; ++cc)
87 d[rr*width + cc] = s[rr*width + (width-1-cc)];
93 uint32_t * d = (uint32_t *) dest;
94 uint32_t * s = (uint32_t *) src;
95 for(
size_t rr=0; rr< height; ++rr)
97 for(
size_t cc=0; cc<width; ++cc)
99 d[rr*width + cc] = s[rr*width + (width-1-cc)];
105 uint64_t * d = (uint64_t *) dest;
106 uint64_t * s = (uint64_t *) src;
107 for(
size_t rr=0; rr< height; ++rr)
109 for(
size_t cc=0; cc<width; ++cc)
111 d[rr*width + cc] = s[rr*width + (width-1-cc)];
117 uint8_t * d = (uint8_t *) dest;
118 uint8_t * s = (uint8_t *) src;
119 for(
size_t rr=0; rr< height; ++rr)
121 for(
size_t cc=0; cc<width*szof; cc += szof)
123 for(
size_t pp=0; pp<szof;++pp)
125 d[rr*width*szof + cc + pp] = s[rr*width*szof + (width*szof-szof-cc) +pp];
142 uint8_t * d = (uint8_t *) dest;
143 uint8_t * s = (uint8_t *) src;
144 for(
size_t rr=0; rr< height; ++rr)
146 for(
size_t cc=0; cc<width; ++cc)
149 d[rr*width + cc] = s[(height-1-rr)*width + (width-1-cc)];
156 uint16_t * d = (uint16_t *) dest;
157 uint16_t * s = (uint16_t *) src;
158 for(
size_t rr=0; rr< height; ++rr)
160 for(
size_t cc=0; cc<width; ++cc)
163 d[rr*width + cc] = s[(height-1-rr)*width + (width-1-cc)];
170 uint32_t * d = (uint32_t *) dest;
171 uint32_t * s = (uint32_t *) src;
172 for(
size_t rr=0; rr< height; ++rr)
174 for(
size_t cc=0; cc<width; ++cc)
177 d[rr*width + cc] = s[(height-1-rr)*width + (width-1-cc)];
184 uint64_t * d = (uint64_t *) dest;
185 uint64_t * s = (uint64_t *) src;
186 for(
size_t rr=0; rr< height; ++rr)
188 for(
size_t cc=0; cc<width; ++cc)
191 d[rr*width + cc] = s[(height-1-rr)*width + (width-1-cc)];
198 uint8_t * d = (uint8_t *) dest;
199 uint8_t * s = (uint8_t *) src;
200 for(
size_t rr=0; rr< height; ++rr)
202 for(
size_t cc=0; cc<width*szof; cc += szof)
204 for(
size_t pp=0; pp<szof;++pp)
206 d[rr*width*szof + cc + pp] = s[(height-1-rr)*width*szof + (width*szof-szof-cc) +pp];
void * imcpy(void *dest, void *src, size_t width, size_t height, size_t szof)
Copy one image to another, with no transformation.
void * imcpy_flipLR(void *dest, void *src, size_t width, size_t height, size_t szof)
Copy one image to another, flipping left-right.
void * imcpy_flipUDLR(void *dest, void *src, size_t width, size_t height, size_t szof)
Copy one image to another, flipping up-down and left-right.
void * imcpy_flipUD(void *dest, void *src, size_t width, size_t height, size_t szof)
Copy one image to another, flipping up-down.
Header for the image processing utilities.