List Info

Thread: MorphImages changed at 6.2.6?




MorphImages changed at 6.2.6?
user name
2006-01-10 00:35:19
At 6.2.5, MorphImages in the program below produces 3
images. The  
first image is a copy of the 1st input image, the 2nd image
is  
halfway between the 1st and 2nd input image, and the 3rd
image is a  
copy of the 2nd input image.

At 6.2.6, MorphImages also produces 3 images, but both the
1st and  
2nd are copies of the 1st input image and the 3rd is a copy
of the  
2nd input image. There is no intermediate image.

I notice that

convert image1.gif image2.gif -morph 1 output.gif

works as expected at 6.2.6. What am I doing wrong?

/*
* gcc `Magick-config --cflags --cppflags` morph.c
`Magick-config -- 
ldflags --libs` -o morph
*/

#include <string.h>
#include <stdlib.h>
#include "magick/api.h"
#include "magick/magick-type.h"

int main(int argc, char **argv)
{
     Image *button_0, *button_1;
     Image *images;
     Image *morphed_images;
     ImageInfo *info;
     ExceptionInfo exception;

     InitializeMagick("enhanceTest");

     GetExceptionInfo(&exception);

     info = CloneImageInfo(NULL);
     strcpy(info->filename,
"/home/tim/vslick/RMagick/doc/ex/images/ 
Button_0.gif");
     button_0 = ReadImage(info, &exception);
     if (exception.severity != UndefinedException)
     {
         printf("ReadImage: %s: %s",
exception.reason,  
exception.description);
         exit(1);
     }
     strcpy(info->filename,
"/home/tim/vslick/RMagick/doc/ex/images/ 
Button_1.gif");
     button_1 = ReadImage(info, &exception);
     if (exception.severity != UndefinedException)
     {
         printf("ReadImage: %s: %s",
exception.reason,  
exception.description);
         exit(1);
     }

     images = NewImageList();
     AppendImageToList(&images, button_0);
     AppendImageToList(&images, button_1);

     morphed_images = MorphImages(images, 1UL,
&exception);
     if (exception.severity != UndefinedException)
     {
         printf("MorphImages: %s: %s",
exception.reason,  
exception.description);
         exit(1);
     }

     DisplayImages(info, morphed_images);

     DestroyImageInfo(info);
     DestroyImageList(images);
     DestroyImageList(morphed_images);

     exit(0);
}

_______________________________________________
Magick-developers mailing list
Magick-developersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/m
agick-developers
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )