Releases: cshum/vipsgen
v1.3.9
v1.3.8
v1.3.7
v1.3.5
image.WriteToMemory
Export a vips image as raw pixel bytes — the symmetric counterpart to NewImageFromMemory:
buf, err := img.WriteToMemory()Use Width(), Height(), Bands(), and BandFormat() to interpret the buffer. See examples/go_image for a complete example of converting between Go's image.Image and vips using raw memory.
What's Changed
Full Changelog: v1.3.3...v1.3.5
v1.3.3
Bug fix: vips.KeepNone now works correctly
Previously, setting Keep: KeepNone (or relying on VIPS_STRIP_METADATA=1
via imagor) had no effect — metadata was always preserved.
This was because vipsgen_set_int skipped zero values, so KeepNone = 0 was
silently dropped and libvips defaulted to keeping all metadata.
- Added vipsgen_set_keep: a dedicated C setter for the keep parameter
- KeepNone is remapped to -1 in Go; vipsgen_set_keep translates it back
to C VIPS_FOREIGN_KEEP_NONE (0) before passing to libvips - Zero value of Keep (0) now safely means "not set" — libvips uses its
own default (keep all)
What's Changed
- fix: pass keep=0 (KeepNone) through to libvips for metadata stripping by @cshum in #78
- refactor: flag handling for VipsForeignKeep by @cshum in #79
Full Changelog: v1.3.1...v1.3.3
v1.3.1
v1.3.0
libvips 8.18 and multi-version pre-generated packages
https://www.libvips.org/2025/12/04/What's-new-in-8.18.html
-
Updated to libvips 8.18.0 - Latest bindings include support for all new operations and features in libvips 8.18
-
Pre-generated bindings for multiple libvips versions- Now shipping with bindings for libvips 8.16.1, 8.17.3, and 8.18.0
github.com/cshum/vipsgen/vipsfor libvips 8.18.x (recommended)github.com/cshum/vipsgen/vips817for libvips 8.17.xgithub.com/cshum/vipsgen/vips816for libvips 8.16.x
What's Changed
Full Changelog: v1.2.1...v1.3.0
v1.2.1
v1.2.0
Optional Output Parameters Support
vipsgen v1.2.0 introduces optional output parameters for common argument types. See examples.
Smartcrop with Attention Coordinates
Operation: vips_smartcrop
Optional Outputs: AttentionX, AttentionY
The coordinates where the algorithm detected the most interesting content for cropping.
options := vips.DefaultSmartcropOptions()
err := img.Smartcrop(width, height, options)
// Access the attention coordinates
fmt.Printf("Attention Center: x=%d, y=%d\n", options.AttentionX, options.AttentionY)Mosaic with Transformation Parameters
Operation: vips_mosaic
Optional Outputs: Dx0, Dy0, Scale1, Angle1, Dx1, Dy1
The detected transformation parameters when combining two images.
options := vips.DefaultMosaicOptions()
err := img1.Mosaic(img2, direction, xref, yref, xsec, ysec, options)
// Access transformation parameters
fmt.Printf("Integer Offset: dx0=%d, dy0=%d\n", options.Dx0, options.Dy0)
fmt.Printf("Detected Scale: %.3f\n", options.Scale1)
fmt.Printf("Detected Rotation: %.3f degrees\n", options.Angle1)What's Changed
Full Changelog: v1.1.3...v1.2.0