-
Notifications
You must be signed in to change notification settings - Fork 0
/
composite.c
55 lines (35 loc) · 983 Bytes
/
composite.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//GetImageProperty
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <wand/MagickWand.h>
void composite(int type) {
MagickWand *magick_wand, *clone_wand;
char filename[2048];
magick_wand = NewMagickWand();
MagickReadImage(magick_wand, "./pngtrans.png");
clone_wand = CloneMagickWand(magick_wand);
//MagickReduceNoiseImage(magick_wand, 2);
//MagickDespeckleImage(magick_wand);
MagickGaussianBlurImageChannel(magick_wand,
DefaultChannels, 5, 2);
MagickCompositeImageChannel(
magick_wand,
AlphaChannel,
clone_wand,
type,
0, 0
);
sprintf(filename, "./pngtrans/pngtrans_%d_out.png", type);
MagickWriteImage(magick_wand, filename);
}
int main(int argc,char **argv) {
int x;
MagickWandGenesis();
for (x=0 ; x<50 ; x++) {
composite(x);
}
MagickWandTerminus();
return 0;
}