Posts

Post not yet marked as solved
1 Replies
637 Views
After lots of wrangling through nonexistent documentation, I finally managed to get my extension to be called. Problem: whatever image I try to draw, there's always black borders around it.Currently, I'm using `QLThumbnailProvider` and the `provideThumbnail` method to do my work. This is on 10.15.2 (Catalina). For context, I'm trying to render thumbnails of MKV files with embedded cover art. I've extracted the art and used `CGDataProviders` to make it into a `CGImage` -- the last step is getting it to draw properly.In 10.14, the QLVideo extension worked pretty well (https://github.com/Marginal/QLVideo), but now in 10.15 it's also doing the black-bars-on-the-sides thing. I thought it might be because the QuickLook generator API was deprecated, hence my foray into this new API. No dice.Here's an illustration: https://imgur.com/yRrcl72The first image shows the problem I'm having: black borders on the left and right. The second image shows the "expected" output, where the image fits nicely — this is the behaviour with the default thumbnailer for MP4 files.For reference, here is my current code: https://pastie.io/jdewlj.swiftEDIT: After some experimentation, it looks like the size of the border is fixed; at 128x128 icon size in Finder, the borders always look to occupy around 15 points (measured with the screenshotting tool), regardless of the width of the inside content. My guess is that the old `IconFlavour` option was either broken, ignored, or removed in Catalina, which causes the old qlGenerator plugins to break as well, since it used that option to set minimal decorations.
Posted
by zhiayang.
Last updated
.