Replies: 1 comment 14 replies
-
|
Hi @bertwim, there are several ways (of course) but the easiest is to use the https://www.libvips.org/API/8.17/property.ForeignSave.keep.html For example: image.write_to_file("x.jpg", VImage::option()->set("keep", "icc|xmp"));Will write the JPEG file with only icc and xmp metadata (ie. no exif). You could also do: image.write_to_file("x.jpg", VImage::option()->set("keep", ~VIPS_FOREIGN_KEEP_EXIF));ie. keep everything but exif. The vips main prog is handy for checking argument names and types: $ vips jpegsave
save as jpeg
usage:
jpegsave in filename [--option-name option-value ...]
where:
in - Image to save, input VipsImage
filename - Filename to save to, input gchararray
optional arguments:
Q - Q factor, input gint
default: 75
min: 1, max: 100
optimize-coding - Compute optimal Huffman coding tables, input gboolean
default: false
interlace - Generate an interlaced (progressive) jpeg, input gboolean
default: false
trellis-quant - Apply trellis quantisation to each 8x8 block, input gboolean
default: false
overshoot-deringing - Apply overshooting to samples with extreme values, input gboolean
default: false
optimize-scans - Split spectrum of DCT coefficients into separate scans, input gboolean
default: false
quant-table - Use predefined quantization table with given index, input gint
default: 0
min: 0, max: 8
subsample-mode - Select chroma subsample operation mode, input VipsForeignSubsample
default enum: auto
allowed enums: auto, on, off
restart-interval - Add restart markers every specified number of mcu, input gint
default: 0
min: 0, max: 2147483647
keep - Which metadata to retain, input VipsForeignKeep
default flags: exif:xmp:iptc:icc:other:gainmap:all
allowed flags: none, exif, xmp, iptc, icc, other, gainmap, all
background - Background value, input VipsArrayDouble
page-height - Set page height for multipage save, input gint
default: 0
min: 0, max: 100000000
profile - Filename of ICC profile to embed, input gchararray
operation flags: sequential nocache
$ |
Beta Was this translation helpful? Give feedback.
14 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It is still a mystery to me how to strip (exif)metadata from an image. I am using the C++-api, but the documentation (both C/C++) is rather incomplete on this topic and any attempt I have made failed.
Is there somebody who can give an example how to do this?
Beta Was this translation helpful? Give feedback.
All reactions