Skip to content

Commit

Permalink
Fix AvifExportParams StripMetadata (#383)
Browse files Browse the repository at this point in the history
The StripMetadata param in AvifExportParams was ignored.
  • Loading branch information
errm authored Oct 22, 2023
1 parent 75637c2 commit 00aefc3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion vips/foreign.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ int set_heifsave_options(VipsOperation *operation, SaveParams *params) {

// https://github.com/libvips/libvips/blob/master/libvips/foreign/heifsave.c#L653
int set_avifsave_options(VipsOperation *operation, SaveParams *params) {
int ret = vips_object_set(VIPS_OBJECT(operation), "compression",
int ret = vips_object_set(VIPS_OBJECT(operation), "strip", params->stripMetadata, "compression",
VIPS_FOREIGN_HEIF_COMPRESSION_AV1, "lossless",
params->heifLossless, NULL);

Expand Down
1 change: 1 addition & 0 deletions vips/foreign.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ func vipsSaveAVIFToBuffer(in *C.VipsImage, params AvifExportParams) ([]byte, err

p := C.create_save_params(C.AVIF)
p.inputImage = in
p.stripMetadata = C.int(boolToInt(params.StripMetadata))
p.outputFormat = C.AVIF
p.quality = C.int(params.Quality)
p.heifLossless = C.int(boolToInt(params.Lossless))
Expand Down

0 comments on commit 00aefc3

Please sign in to comment.