-
Notifications
You must be signed in to change notification settings - Fork 0
/
mergeTest.c
63 lines (47 loc) · 1.35 KB
/
mergeTest.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
55
56
57
58
59
60
61
62
63
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <wand/MagickWand.h>
void foo(int x) {
MagickWand *magick_wand;
MagickWand *magick_wand_green;
char filename[1024];
MagickWand *merged;
MagickBooleanType status;
magick_wand = NewMagickWand();
magick_wand_green = NewMagickWand();
//This is a color image
status = MagickReadImage(magick_wand, "./Biter_500.jpg");
status = MagickReadImage(magick_wand_green, "./greenDiscAlpha.png");
status = MagickAddImage(magick_wand, magick_wand_green);
// CoalesceLayer,
// CompareAnyLayer,
// CompareClearLayer,
// CompareOverlayLayer,
// DisposeLayer,
// OptimizeLayer,
// OptimizeImageLayer,
// OptimizePlusLayer,
// OptimizeTransLayer,
// RemoveDupsLayer,
// RemoveZeroLayer,
// CompositeLayer,
// MergeLayer,
// FlattenLayer,
// MosaicLayer,
// TrimBoundsLayer
sprintf(filename, "./mergeTest_%d.png", x);
merged = MagickMergeImageLayers(magick_wand, x);
MagickSetImageFormat(magick_wand, "png");
status = MagickWriteImages(merged, filename, MagickTrue);
}
int main(int argc,char **argv) {
int x;
MagickWandGenesis();
//for (x=0; x<TrimBoundsLayer ; x++) {
foo(TrimBoundsLayer);
//}
MagickWandTerminus();
return(0);
}