John Hunter schrieb:
> On Mon, Jun 9, 2008 at 10:18 AM,
>
>   
>> I attached a patch against the current svn version that adds a 'resample'
>> argument to imshow. Additionally, this patch supports a 'image.resample'
>> entry in the rc file. Setting this to false (default), the behaviour is
>> unchanged.
>>     
>
> Hi Gregor -- thanks for sending this.  It's something I was aware of
> in agg but never got around to exposing.  I wonder if the
> resample=True|False is the right approach.  It might be nice for
> imshow to have an 'auto' mode to either resample or interpolate
> depending on the image dimensions w/ respect to the destination size.
> Ie, if we are displaying the full image into a small destination,
> 'auto' would default to resample.  If we zoom in sufficiently, the
> image might be best displayed with interpolation.  Is this something
> you think would be worthwhile and would you like to work on support
> for this?
>   
If I understood it correctly, Agg (i.e., span_image_resample_*) already 
exactly behaves like you proposed. It resamples the image if the scaling 
is less than 1, otherwise it interpolates.

> Also,l I notice the patch exposes span_image_resample_rgba_affine but not
> span_image_resample_rgba which takes an interpolator template
> argument.  I know very little about this area, but was this a
> conscious choice or one of expediency?  Can you explain the rational?
>
>   
I am not an Agg expert. The documentation of Agg is not very exhaustive. 
I took it from one of the demos. span_image_resample_rgba_affine seems 
to be faster than span_image_resample_rgba, but it supports affine but 
no perspective transformations. If I understood it correctly, matplotlib 
only uses image translation and scaling, not even rotation or shearing. 
All this is covered by span_image_resample_rgba_affine.

Gregor

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to