Why does the thumbnail method need the path? #116
|
Hi, thank you for making this library. I will definitely give it a try and see how it compares to skiko. It sounds all very promising. Looking at the sample code I wonder why it takes a path parameter. Kind regards, Stefan |
Answered by
lopcode
Nov 17, 2024
Replies: 2 comments 1 reply
|
Hey Stefan 👋 Sorry, I'm not quite understanding - which path parameter specifically, is it in one of these files https://github.com/lopcode/vips-ffm/tree/main/sample/src/main/kotlin/vipsffm/sample ? They're a mixture of showing common image handling patterns, and testing, so not all of them will make sense for your use case. |
1 reply
|
Great, thank you! 🙂 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Never mind, I see what you mean, that does look weird! The answer is you don't have to pass the path, it's an oddity caused by the automatic code generation - ideally that method would be static like
VImage.thumbnail(<path>), but it currently isn't. libvips offersthumbnailImageas an operation on an existing image, which makes more sense.I've updated the README and sample here to use the
thumbnailImageoperation instead: #117