PandA-2024.02
examples
function_pointers
filtering_pipeline
inverse.c
Go to the documentation of this file.
1
/* inverse.c */
2
#include "
mypgm.h
"
3
4
int
make_inverse_image
(
unsigned
char
*image1,
unsigned
char
*image2,
unsigned
int
x_size,
unsigned
int
y_size)
5
/* inverse of image1 is output into image2 */
6
{
7
int
x
, y;
/* control variable */
8
9
for
(y = 0; y < y_size; y++) {
10
for
(x = 0; x < x_size; x++) {
11
*(image2 + y + x *
MAX_IMAGESIZE
) = (
unsigned
char
)
12
(
MAX_BRIGHTNESS
- *(image1 + y + x *
MAX_IMAGESIZE
));
13
}
14
}
15
16
return
0;
17
}
MAX_IMAGESIZE
#define MAX_IMAGESIZE
Definition:
mypgm.h:7
make_inverse_image
int make_inverse_image(unsigned char *image1, unsigned char *image2, unsigned int x_size, unsigned int y_size)
Definition:
inverse.c:4
MAX_BRIGHTNESS
#define MAX_BRIGHTNESS
Definition:
mypgm.h:8
mypgm.h
x
x
Return the smallest n such that 2^n >= _x.
Definition:
math_function.hpp:170
Generated on Mon Feb 12 2024 13:02:49 for PandA-2024.02 by
1.8.13