53 karma · joined Nov 14, 2014 (12y ago) · 43 submissions
comment 1mo ago · link · parent
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 2mo ago · link · parent
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 3mo ago · link · parent
- 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 5mo ago · link · parent
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 5mo ago · link · parent
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 8mo ago · link · parent
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 11mo ago · link · parent
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 1y ago · link · parent
https://github.com/libvips/libvips/wiki/Speed-and-memory-use
comment 1y ago · link · parent
`govips` was a pretty early binding and wasn't really done the libvips way. It doesn't expose all the operations or options, it's mostly done by hand, and there are a number of leaks and misfeatures.
It's been replaced by `vipsgen`:
https://github.com/cshum/vipsgen
Which is an automatically generated 100% binding. It should have the complete API, it should be very stable and leak-free, and it should be simple to maintain.
`autorot` is pretty expensive. You'll see much better performance if you flip x and y in your crop instead.
comment 1y ago · link · parent
VipsImage *image = vips_image_new_from_file("something.jpg", "autorotate", TRUE, NULL);
and it'll flip it upright for you and remove any EXIF orientation tag. It isn't the default since it has (obviously) a large memory and cpu cost.
For simple resize and crop it's much better to use the exif tag to adjust the resize and crop parameters (the vipsthumbnail command does this).
comment 1y ago · link · parent
https://github.com/lovell/sharp/issues/955#issuecomment-5458...
(that specific graph is for switching from glib to the musl memory allocator, but jemalloc gives a very similar result)
comment 1y ago · link · parent
https://github.com/kleisauke/wasm-vips/issues/3
It does support AVIF and JXL. Hopefully Apple will abandon HEIC hehe.
comment 2y ago · link · parent
https://github.com/libvips/pyvips
The idea is that complex CLIs like imagemagick's are almost complete programming languages, and need a lot of learning. It's much better (imo) (and less work) to have a good binding, and to lean on python for the programming side.
libvips is mostly self-binding. It has good introspection support, so the core of pyvips is just 200 lines of code, and automatically updates itself for new libvips versions.
comment 2y ago · link · parent
https://github.com/jcupitt/vipsdisp
It should be fine with your huge PNGs. Internally it's a bit like a tiled map viewer, but it makes the tiles as you view the image with a set of background worker threads. It uses your GPU to scale and composite the set of visible tiles to your screen.
It uses openslide to let you view slide formats like SVS and MRXS, which might be handy. It also supports colour management.
comment 2y ago · link · parent
https://github.com/libvips/nip2
Your example might look like this:
Everything is live, so you can drag sliders and adjust expressions and it all updates.
There's also imagemagick, of course, but it's command-line only.
comment 3y ago · link · parent
https://github.com/libvips/pyvips/blob/master/examples/annot...
tldr: make an image containing your text, composite it over the image you want to annotate.
comment 4y ago · link · parent
JXL, AVIF and HEIC use next-gen compressors and are about half the size of JPEG and WebP at the same quality. HEIC has a range of terrible patent problems, so the current choice is AVIF vs JXL.
AVIF has wider industry support and is likely to get hardware decode. JXL is technically more interesting and more flexible, and far better CPU encode/decode performance.