sharp(input)
.recomb([
[0.3588, 0.7044, 0.1368],
[0.2990, 0.5870, 0.1140],
[0.2392, 0.4696, 0.0912],
])
.raw()
.toBuffer(function(err, data, info) {
// data contains the raw pixel data after applying the matrix
// With this example input, a sepia filter has been applied
});
This PR will add support for
vips_recomb
onImageRef
, will provide similar functionality as sharp does(https://sharp.pixelplumbing.com/api-operation#recomb)Sharp example:
Go example after this PR merged:
test.png![test](https://github.com/davidbyttow/govips/assets/24852034/ae8c4c80-db8c-4557-8d61-e6ec09dc7024)
experiment.png![experiment](https://github.com/davidbyttow/govips/assets/24852034/6d54ad89-5d8e-444e-8131-77337a7dd8f2)