[magick-developers] Interpolate always BilinearInterpolatePixel/UndefinedInterpolatePixel
Thomas.Stegemann at materna.de
Thomas.Stegemann at materna.de
Tue Jun 24 06:34:19 PDT 2008
Hello,
for inline images always the UndefinedInterpolatePixel interpolation is used:
In draw.c
> MagickExport MagickBooleanType DrawPrimitive(Image *image, const DrawInfo *draw_info,const PrimitiveInfo *primitive_info)
> [...]
> case ImagePrimitive:
> [...]
the clone_info is set to default values (the default for interpolate is UndefinedInterpolatePixel)
and with this settings the inline image is created.
> clone_info=AcquireImageInfo();
> if (LocaleNCompare(primitive_info->text,"data:",5) == 0)
> composite_image=ReadInlineImage(clone_info,primitive_info->text,
> &image->exception);
> else
> {
> (void) CopyMagickString(clone_info->filename,primitive_info->text,
> MaxTextExtent);
> composite_image=ReadImage(clone_info,&image->exception);
> }
> [...]
Then the image with the default settings is drawn with DrawAffineImage
> (void) DrawAffineImage(image,composite_image,&affine);
and in DrawAffineImage the interpolate method of the image to be drawn (UndefinedInterpolatePixel) is used.
> MagickExport MagickBooleanType DrawAffineImage(Image *image, const Image *source,const AffineMatrix *affine)
> [...]
> resample_filter=AcquireResampleFilter(source,&image->exception);
I think it is more reasonable to use the the interpolate method of the image passed to DrawPrimitive, isn't it?
Best regards
Thomas Stegemann
More information about the Magick-developers
mailing list