add blend mode tests
[swfdec.git] / test / image / negative-color-transform.c
blob1e18c7d5e3638ef64f4b76810e6324128f80a7ed
1 /* gcc `pkg-config --libs --cflags libming` negative-color-transform.c -o negative-color-transform && ./negative-color-transform
2 */
4 #include <ming.h>
5 #include <stdio.h>
7 int
8 main (int argc, char **argv)
10 SWFMovie movie;
11 SWFDisplayItem item;
12 SWFJpegBitmap image;
13 SWFShape shape;
15 if (Ming_init ())
16 return 1;
17 Ming_useSWFVersion (7);
19 movie = newSWFMovie();
20 SWFMovie_setRate (movie, 1);
21 SWFMovie_setDimension (movie, 10, 10);
23 image = newSWFJpegBitmap (fopen ("bw.jpg", "r+"));
24 shape = newSWFShapeFromBitmap ((SWFBitmap) image, SWFFILL_BITMAP);
26 item = SWFMovie_add (movie, (SWFBlock) shape);
27 SWFDisplayItem_setCXform (item, newSWFCXform (100, 0, 0, 0, -90./256, 1.0, 1.0, 1.0));
28 SWFMovie_nextFrame (movie);
30 SWFMovie_save (movie, "negative-color-transform.swf");
31 return 0;