Interpolate always BilinearInterpolatePixel/UndefinedInterpolatePixel
<[email protected]> Tue, 24 Jun 2008 15:34:19 +0200
| Newsgroups | gmane.comp.video.image-magick.devel |
|---|---|
| Message-ID | <[email protected]> |
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