You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VIPS_REGION_SHRINK_MEAN | use the average
VIPS_REGION_SHRINK_MEDIAN | use the median
VIPS_REGION_SHRINK_MODE | use the mode
VIPS_REGION_SHRINK_MAX | use the maximum
VIPS_REGION_SHRINK_MIN | use the minimum
VIPS_REGION_SHRINK_NEAREST | use the top-left pixel
We want to add an optional kwarg: resample that would an enum that would include the PIL Resample modes and the vips options. For any of the PIL modes, we should just use PIL for downsampling. For other modes, we probably need to implement this with numpy.
Also, when downsampling, to reduce tile edge effects caused by filtering (e.g., when using Lanczos or hamming), we probably want to pick a larger area, downsample that, and crop.
The text was updated successfully, but these errors were encountered:
This could be considered details related to #1002.
When we write an image, we want to be able to control how downsampling is done for lower resolution layers. In vips, we have (https://www.libvips.org/API/current/VipsRegion.html)
and, in PIL we have https://pillow.readthedocs.io/en/stable/reference/Image.html#resampling-filters. PIL properly does this (see https://zuru.tech/blog/the-dangers-behind-image-resizing).
We want to add an optional kwarg:
resample
that would an enum that would include the PIL Resample modes and the vips options. For any of the PIL modes, we should just use PIL for downsampling. For other modes, we probably need to implement this with numpy.Also, when downsampling, to reduce tile edge effects caused by filtering (e.g., when using Lanczos or hamming), we probably want to pick a larger area, downsample that, and crop.
The text was updated successfully, but these errors were encountered: