-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extending examples #99
Comments
I've been trying for some time now to save GIFs and this post saved me, so yeah, I can imagine this will help quite some people. I'm not sure if the method to support GIF saving will work for us though. |
Have you seen the The first snippet breaks the aspect ratio, it's usually not convenient to do that. Also, as mentioned in #97 (comment) I'd avoid ThumbnailImage, if possible. For the second snippet, note that the libvips binary |
fwiw, there is also an online playground available for libvips that can be useful for making prototypes. It has a similar API as the .NET binding: http://kleisauke.github.io/wasm-vips/playground/ |
The second snippet is no longer required for libvips 8.12, as that features a This can be tested using the NetVips.Native v8.12.0-rc1 NuGet package. |
NetVips v2.1.0 and NetVips.Native v8.12.1 is now available. |
Issue
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:
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:
image.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");
Since v8.12.0-rc1: https://www.libvips.org/2021/11/14/What's-new-in-8.12.html#better-gif-save
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.
The text was updated successfully, but these errors were encountered: