-
Notifications
You must be signed in to change notification settings - Fork 15
/
fuzz.c
35 lines (29 loc) · 855 Bytes
/
fuzz.c
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
#include <stdlib.h>
#include "qcms.h"
int main()
{
unsigned char outt[3];
#define LENGTH 256*256*256
static unsigned char src[LENGTH*3];
static unsigned char output[LENGTH*3];
int i,j,k,l=0;
qcms_profile *input_profile, *output_profile;
qcms_transform *transform;
input_profile = qcms_profile_from_path("lcms_test/input.icc");
output_profile = qcms_profile_from_path("lcms_test/output.icc");
transform = qcms_transform_create(input_profile, QCMS_DATA_RGB_8, output_profile, QCMS_DATA_RGB_8, QCMS_INTENT_PERCEPTUAL);
for (i=0; i<256; i++) {
for (j=0; j<256; j++) {
for (k=0; k<256; k++) {
src[l++] = i;
src[l++] = j;
src[l++] = k;
}
}
}
qcms_transform_data(transform, src, output, LENGTH);
qcms_transform_release(transform);
qcms_profile_release(input_profile);
qcms_profile_release(output_profile);
return 0;
}