Extending examples
See original GitHub issueIssue Current index page with tutorials https://kleisauke.github.io/net-vips/tutorial/getting_started.html could be improved with more snippets which would save new users (like me) some time. These are some basic things most web app devs need:
- Resizing to exact size:
First try after migrating to libvips from another image library:
image.ThumbnailImage(width: w, height: h);
Actual way to do it:image.ThumbnailImage(width: w, height: h, size: "force");
2) Saving gif image:
First attempt:
Since v8.12.0-rc1: https://www.libvips.org/2021/11/14/What’s-new-in-8.12.html#better-gif-saveimage.WriteToFile('somepath.gif');
Actual way to do it: 1) Uninstall nuget with dll binaries. 2) Download binaries from libvips, mark as embedded resources 3) image.Magicksave("somepath.gif", "gif");
Describe the solution you’d like Consider adding these to the examples.
Describe alternatives you’ve considered Do nothing, keep things as is. It was hard to write, it should be hard to use.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
NetVips v2.1.0 and NetVips.Native v8.12.1 is now available.
The second snippet is no longer required for libvips 8.12, as that features a
gifsave
operation that uses cgif and libimagequant. See: https://www.libvips.org/2021/11/14/What’s-new-in-8.12.html#better-gif-saveThis can be tested using the NetVips.Native v8.12.0-rc1 NuGet package.