John Cupitt
John Cupitt
You're making a 640 x 400 pixel PNG, then upsizing to 4096 x 4096 using pyvips. Your edges will be fuzzy and a bit ugly. Instead, you can get matplotlib...
Hi @scossu, "buffer" is a very overloaded term in Python :( pyvips uses it to mean the buffer type: https://docs.python.org/3/c-api/buffer.html ie. it's a chunk of memory with a start and...
Sure, it sounds as if it's confusing. What would you recommend as a clearer explanation? At the moment, it's: ``` data (str, buffer): The memory object to load the image...
Though the real answer is that `data` can be anything that implements the Python buffer protocol. I'm not how to best express that.
Yes, it should be possible to support something like that, for jpg and png images at least. I tried clarifying the docs.
TIFF needs random access to read, so you can only decode it if you have the whole of the tiff image file there. You can read from memory or a...
You can use `read() `to turn a mmap object into a buffer. This works for me: ```python import sys import mmap import pyvips fd = open(sys.argv[1], "r") buf = mmap.mmap(fd.fileno(),...
I think it would be memory efficient: `read()` on mmap should just adapt the pointer, not do a malloc and copy. I am just guessing though -- you'd need to...
Hi @hroskes, thank you for reporting this. Your sample code is working for me on ubuntu 21.10 (numpy 1.19.5). I'll see if I can get 1.20 installed.
Yes, I see a failure too for numpy 1.21.4. I'm actually surprised this ever worked, so I think I'd tag this as not-a-bug. The numpy / pyvips interface that pyvips...