image resize: unsupported gap
See original GitHub issueHello, I have a question about a discrepancy between the docs and the actual package. I want to use image resize with sending optional gap as it is referred to in docs, but it crashes with an error…
Package: 2.2.0 (from conda) Docs: https://libvips.github.io/pyvips/vimage.html?highlight=resize#pyvips.Image.resize Code:
img = pyvips.Image.new_from_file(img_path).resize(0.05, gap=2.0).numpy()
Output:
opt/conda/lib/python3.7/site-packages/pyvips/vimage.py in call_function(*args, **kwargs)
1345 @_add_doc(name)
1346 def call_function(*args, **kwargs):
-> 1347 return pyvips.Operation.call(name, self, *args, **kwargs)
1348
1349 return call_function
/opt/conda/lib/python3.7/site-packages/pyvips/voperation.py in call(operation_name, *args, **kwargs)
287 name not in intro.optional_output):
288 raise Error('{0} does not support optional argument {1}'
--> 289 .format(operation_name, name))
290
291 value = kwargs[name]
Error: resize does not support optional argument gap
Issue Analytics
- State:
- Created a year ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Catalog image resizing performance problems #8145 - GitHub
I ran bin/magento catalog:image:resize . I then ran your find pub/media/catalog/product/cache -type f -exec shasum {} \; | sort command, and ...
Read more >MATLAB imresize - Resize image - MathWorks
Shrink the image to 40% of the original size using nearest-neighbor interpolation. This is the fastest method, but it has the lowest quality....
Read more >Resize image with javascript canvas (smoothly) - Stack Overflow
The first one is a normal resized image tag, and the second one is canvas. Notice how the canvas one is not as...
Read more >tf.image.resize | TensorFlow v2.11.0
Used in the notebooks. Resized images will be distorted if their original aspect ratio is not the same as size . To avoid...
Read more >Resizing or Scaling -- IM v6 Examples - ImageMagick
However, many filters (even the default filters) can blur images slightly. It is part of their nature. So normally this 'short-circuit' for a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I commented on https://github.com/conda-forge/pyvips-feedstock/pull/24#issuecomment-1193322009 to mention that pyvips should be backward compatible with older libvipses. Hopefully they will update it to v2.2.1.
The python wrapper is (largely) generated at runtime, so the API you get is the API of the underlying libvips binary. Just drop in the
libvips.so
for 8.13 and you should get the new API.The thumbnail operation knows about the various WSI formats and will pick the fastest resize method for you. For example, on this seven year old laptop:
Or in python: