Recent submissions

Comment · 27 days ago
We just banned gen-AI PRs, it seems to be working so far.

Commercial dev is about results and money, and that makes AI almost impossible to resist.

OSS has always been about process. The pleasure is in tinkering with code, collaborating with friends on a fun new idea, and helping people. I don't care about speed.

Comment · 1 month ago
The fix is pretty easy -- you should call `block_untrusted` to stop loaders like matlab from running:

https://www.rubydoc.info/gems/ruby-vips/Vips.block_untrusted

You can also set the env var `VIPS_BLOCK_UNTRUSTED`, which might be easier.

You can block or allow specific load operations, so you can limit format support to just the types you need:

https://www.rubydoc.info/gems/ruby-vips/Vips#block-class_met...

That might be even better.

There was a post on libvips.org about this a while ago:

https://www.libvips.org/2022/05/28/What's-new-in-8.13.html

And a note about it in the checklist for devs:

https://www.libvips.org/API/current/developer-checklist.html...

Comment · 3 months ago
libvips shouldn't be calling imagemagick for heif decode, it has a nice one built in. Unless you were using a very old libvips!

I've found jemalloc works best for long running libvips processes, fwiw.

Comment · 3 months ago
Hello, looks nice! I had a few thoughts:

- I'd consider adding support for libvips smartcrop, ICC colour management, HDR, image alpha

- can you join pipelines? you could have one making a background, one making a foreground, then composite them, for example

- your benchmarks don't measure peak memory use, it can be a useful thing to test, especially if people are processing large images (eg. the output of every modern smartphone sigh)

- have you benchmarked against nip4, the official libvips GUI? it has a CLI mode you can run with GNU parallel

- I agree, a CLI mode for your tool sounds useful

Comment · 5 months ago
Some packages with native code components (like sharp) will use these hooks to download the correct precompiled native binary for you.
Comment · 5 months ago
sharp downloads over https and checks the sha256 (I think?) of the archive.
Comment · 5 months ago
sharp does this too:

https://sharp.pixelplumbing.com/install/#prebuilt-binaries

it can sometimes need to compile the C++ shim that sits between node and libvips, but that's rare.

Comment · 5 months ago
sharp does not rebuild libvips, it downloads a pre-compiled libvips for your platform.

https://sharp.pixelplumbing.com/install/#prebuilt-binaries

It can usually also download a precompiled binary for the C++ shim that sits between node and libvips, but if your node / arch / etc. is not supported, it'll compile that (that's what the build.js file you linked does).

Comment · 7 months ago
Hello, libvips author here, you can get it to do the OKLab averaging for you. For example, using pyvips (ahem, untested):

image = pyvips.Image.new_from_file(filename, access="sequential")

scale = min(200 / image.width, 200 / image.height)

thumbnail = image.colourspace("oklab").resize(scale).extract_bands(0, n=3)

rgbf = thumbnail.write_to_memory()

That'll stream the source image and make a RGBRGBRGB memory buffer of single precision floats. You could perhaps use kernel="linear" and avoid any ringing from lanczos3.

I think I would downsample in a linear light space, like scRGB. Averaging there means averaging photons, which will surely be better than OKLab. Maybe switch to OKLab for clustering. Though of course I've not tested it.

Comment · 8 months ago
libvips uses imagemagick (via libMagick) for BMP load and save, fwiw
Comment · 10 months ago
It's just `vips copy src.heic dst.jpg`.
Comment · 10 months ago
libvips, the library behind sharp, has just released version 8.18.0: https://www.libvips.org/2025/12/04/What's-new-in-8.18.html

It includes support for UltraHDR (HDR and SDR in one JPEG file), camera RAW images, and the Oklab colourspace. This should all be coming to sharp in the next six month or so.

Comment · 1 year ago
Cleanup can be very useful if you depend on a library that does not support arenas.
Comment · 1 year ago
`free(NULL);` will crash on some platforms that gcc supports, I believe.
Comment · 1 year ago
I'm the libvips author, I should have said, so I'm not very neutral. But at least on that test it's usefully quicker and less memory hungry.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton