-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvc.h
40 lines (29 loc) · 1.3 KB
/
vc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// INSTITUTO POLIT�CNICO DO C�VADO E DO AVE
// 2022/2023
// ENGENHARIA DE SISTEMAS INFORM�TICOS
// VIS�O POR COMPUTADOR
//
// [ DUARTE DUQUE - [email protected] ]
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#define VC_DEBUG
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// ESTRUTURA DE UMA IMAGEM
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
typedef struct {
unsigned char *data;
int width, height;
int channels; // Bin�rio/Cinzentos=1; RGB=3
int levels; // Bin�rio=1; Cinzentos [1,255]; RGB [1,255]
int bytesperline; // width * channels
} IVC;
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// PROT�TIPOS DE FUN��ES
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// FUN��ES: ALOCAR E LIBERTAR UMA IMAGEM
IVC *vc_image_new(int width, int height, int channels, int levels);
IVC *vc_image_free(IVC *image);
// FUN��ES: LEITURA E ESCRITA DE IMAGENS (PBM, PGM E PPM)
IVC *vc_read_image(char *filename);
int vc_write_image(char *filename, IVC *image);
void teste(int a);