Repository navigation
Highlights
Keepexport option: every format-specific*ExportParamsstruct gains aKeep ForeignKeepfield wired to libvips'skeepsave option (libvips 8.15+). WhereStripMetadatais all-or-nothing,Keepis a bitmask:ForeignKeepExif | ForeignKeepIccretains just those,ForeignKeepNonestrips everything,ForeignKeepAllkeeps whatever the running libvips supports. Unset means no change; set, it takes precedence overStripMetadata. On libvips older than 8.15 a setKeepreturns a clear error (#551)
Behavior changes
- WebP exports now keep the source ICC profile when
StripMetadatais false, matching JPEG, PNG and TIFF. Previouslywebpsavewas always givenprofile="none", so WebP output silently lost the profile. Files from sources with an embedded profile grow by roughly the profile's size (about 3 KB for sRGB). To get the old output back, setStripMetadata: trueor aKeepwithoutForeignKeepIcc(#552, #556)
Fixes
Animated and multi-page images had several transforms that treated the stacked frames as one tall image:
Rotate(Angle90/Angle270)failed with "bad grid geometry" unless every page was loaded.Pages()is the page count of the file, not the loaded count (#553, #555)Rotate(Angle180)andFlip(DirectionVertical)reversed the frame order. Both now operate per frame (#554, #558)Zoomleft the page height stale, so a 2× zoom read as twice as many half-height frames (#554, #558)Resizecollapsed frames into one tall image wheneverpageHeight × scalewasn't a whole number, the #350 "toilet roll" again. The vertical scale is now chosen so the strip is exactlyframes × newPageHeight, asvips_thumbnaildoes. Output is unchanged when the rounding already agreed (#554, #558)
Housekeeping
- CI actions bumped to
actions/checkout@v7andactions/setup-go@v7(#550)
Thanks to @diego-choi for Keep and the WebP fix, and to @ailintom for the Rotate fix and the thorough #554 report.