Page 1 of 1

CompositeOperators

Posted: 2008-09-24T08:17:36-07:00
by dummy1620
I must be an idiot but thanks for any help you can give me.

I'm new to C and it probably shows.

compile options:

Code: Select all

cc `MagickWand-config --cflags --cppflags` test.c `MagickWand-config --ldflags --libs`  -o test
Code:

Code: Select all

#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <wand/MagickWand.h>

MagickWand
    *magick_wand;

MagickWand
    *composite_wand;



int main()
{
        FILE *fout;
        FILE *fin;

        MagickWandGenesis();
        magick_wand = NewMagickWand();

        composite_wand = NewMagickWand();

        fin = fopen("image.jpg", "r");
        MagickReadImageFile(magick_wand, fin);
        fclose(fin);

        fin = fopen("image2.jpg", "r");
        MagickReadImageFile(composite_wand, fin);
        fclose(fin);

        MagickCompositeImage(magick_wand, composite_wand, DifferenceCompositeOP, 0, 0);

        fout = fopen("newimage.jpg", "w");
        MagickWriteImageFile(magick_wand, fout);
        MagickWandTerminus();
        return(0);



}

Error:

Code: Select all

test.c: In function 'main':
test.c:49: error: 'DifferenceCompositeOP' undeclared (first use in this function)
test.c:49: error: (Each undeclared identifier is reported only once
test.c:49: error: for each function it appears in.)
what did I miss? Again thanks for your help.

Re: CompositeOperators

Posted: 2008-09-24T08:36:59-07:00
by dummy1620
Nevermind. The documentation is wrong. DifferenceCompositeOP is actually DifferenceCompositeOp.