John Cupitt
John Cupitt
Yes, it's part of homebrew-science. I've not tested it for ages, it might not work :( I've updated my mac to High Sierra now, I'll try to test and maybe...
Hello again, I've built a test version of the new 8.6 release: https://github.com/jcupitt/nip2/releases/tag/v8.6.0-beta2 It works on High Sierra for me. Any testing would be great!
Hello David, no, this is the best place for questions. 1. libvips has had scRGB for a few years, but I've never got around to adding it to the nip2...
I've added scRGB supprt, and improved HDR handling. It seems to work. I'll make you a test build. nip2 supports float tiff, that should work, though I don't know if...
Hi, it should be possible, though I've not tried myself. You need to set up your python with a C compiler and point it at the libvips headers. There are...
Hi Matt, yes, I think I couldn't decide which ^N should map to. It should probably be New Workspace, since that's the most expected behaviour, but I use New Column...
Hello @LightToYang, I would use something like: ```python3 image = pyvips.Image.new_from_file(f, access="sequential") image = image.colourspace("srgb") mem_img = image.write_to_memory() imgnp=np.frombuffer(mem_img, dtype=np.uint8).reshape(image.height, image.width, 3) return imgnp ``` And you should get an...
However, I think your benchmark is misleading. libvips will cache the JPEG decode, so it's just being decoded once. Try: ```python3 def usingVIPS(f): image = pyvips.Image.new_from_file(f, access="sequential") mem_img = image.write_to_memory()...
Actually, it's still a bit quicker. With this code: ```python3 #!/usr/bin/python3 import numpy as np import pyvips import cv2 from PIL import Image import timeit def usingPIL(f): im = Image.open(f)...
## Update pyvips now has better numpy integration, so you can just write: ```python def usingVIPSandShrink(f): image = pyvips.Image.new_from_file(f, access="sequential", shrink=4) return image.numpy() ```