Closed mergesort closed 1 month ago
Hi @mergesort. First of all, thank you for the thank you - it's very appreciated. Second of all, sorry it took me so long to get around to going through the issues & PRs - will be working on increasing my response times going forward. Third of all - this is a great feature request, and one that is definitely needed.
You're right that the FaviconFinder
API has changed, as it was a bit clunky when you tried to do anything advanced. Now you can download the FaviconURLs, download them, and sort them, etc.
I appreciate the code you provided, and will use them to integrate a solution built directly into the library.
You'll hear back from me soon!
@mergesort Can you let me know if the functionality provided in the latest PR gives you what you're after?
Hey @will-lumley, I've been using your project for a while now and wanted to say thank you, and thank you for adding Linux support!
I have code that looks like this, which runs async as part of a process where I download a whole bunch of metadata for a website.
I was upgrading to 5.0 today and noticed that the code wouldn't compile. I tried to do a naive translation to what I found in the updated documentation, but hadn't quite come up with a way to accomplish the same task with these two conditions.
I'd like to get the image's size, even when on Linux.
sizeTag
string, but that seems like a downgrade over the previous type-safe width and height that were provided by the API.width
xheight
)? I've only come across integers so far, but is it possible for a height to be 64.5px tall?I'd like to avoid downloading the whole image to derive a URL and size, so the operation is fast.
faviconFinder.fetchFaviconURLs()
and iterate through all of the asset'ssizeTags
to see which one is the largest? I saw in the documentation you can callfaviconFinder.fetchFaviconURLs().download().largest()
but that will download all of the images to compute their sizes rather than using the already availablesizeTags
.This was the naive implementation I came up with when trying to migrate to 5.0, but it assumes that the first image is the largest rather than using the
sizeTags
to figure out which image is the largest. It should be easy enough to do, but I wanted to post this and ask first to make sure I'm on the right track.Would love to have your guidance, I'm sure that my solution isn't as good as it could be, and think that it likely would be good to have built into the library itself. Thanks again!