[EMAIL PROTECTED] on  wrote...
| 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?
| 
I do have a item on my ToDo list to eventually replace the Affine
function with the version used by -distort.  this will allow you to not
only use interpolated methods, but also area resampling methods
to merge pixels when the image shrinks.

The only reason this has not been done yet is...
1/ Time to look at the older distortion operators. (low priority)
2/ The current area resampling uses a 'gaussian' type cylindrical filter
   which is naturally rather blurry.  I still need to get back into this
   to fix it to use better filtering methods and techniques.
3/ The addition of many other distortion methods, including spatial
   morphing'. (higher priority)

Basically it will be replaced at some indeterminate future date.


  Anthony Thyssen ( System Programmer )    <[EMAIL PROTECTED]>
 -----------------------------------------------------------------------------
         Bad Command or File Name. Good try, though!
         Bad Command or File Name. You have 2 wishes left.
         Bad command or file name! Go stand in the corner.
         Bad command. Bad, bad command! Sit! Stay! Staaay...
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/
_______________________________________________
Magick-developers mailing list
Magick-developers@imagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick-developers

Reply via email to