Results 1568 comments of John Cupitt

Hello @superjaja05, is this an old version of libvips? I tried with current stable (8.15.2): ``` $ vips copy base.gif[n=-1] base2.gif $ vips --version vips-8.15.2 ``` To make: ![base2](https://github.com/libvips/lua-vips/assets/580843/36007387-346c-482e-87df-ac64082481af)

What platform is this? If it's linux, just updating your OS should fix it.

Oh, if you're on windows, the regular lua-vips works pretty well now, there's no need to use a fork. It also supports plain lua as well as luajit.

Hello, `min`, `max`, `mode`, `median` ought to work for your use case, and there's an unfortunate bug if they don't :( Do you have a sample image where they fail?...

Ah wait, you mean you are using GB pairs as data values? Yes, it treats the colour channels as independent, so although no new G values will appear, you will...

Oh I guess you could also use complex numbers for pixel values! But sadly we've not implemented mean / max / mode etc. for complex types, so that would need...

Sorry, I've never tried to write SVS. It's a pretty non-standard and proprietary TIFF though, so I think you'll have a range problems, especially around metadata. Do you have to...

Writing SVS is difficult, and even if you do get it working, it will be extremely slow. A fast, high-quality SVS writer will take many weeks of effort. Are you...

Ah, nice! But as you say, doing this efficiently is quite a bit more difficult.

I would use pyvips to fetch single tiles from the source image, then write each one back with tiffile. But it will probably not be quick :(