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 |
Beta Was this translation helpful? Give feedback.
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. |
Beta Was this translation helpful? Give feedback.
-
Great, thank you! 🙂 |
Beta Was this translation helpful? Give feedback.
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 offersthumbnailImage
as an operation on an existing image, which makes more sense.I've updated the README and sample here to use the
thumbnailImage
operation instead: #117