hydrus icon indicating copy to clipboard operation
hydrus copied to clipboard

Share -> copy/export thumbnail

Open roachcord3 opened this issue 2 years ago • 2 comments

Pretty simple: I'd like to be able to copy/export an item's thumbnail. My primary use case is dealing with saucenao file size limits without having to open an image editor.

roachcord3 avatar Jul 22 '22 23:07 roachcord3

There are currently an API endpoint for this: https://hydrusnetwork.github.io/hydrus/developer_api.html#get_files_thumbnail So some very basic scripting would let you get them through that.

But since your usecase is for Saucenao I recommend just using either HydrusNao or hatate-iqdb since they both get and send a thumbnail/scaled down image when looking up sources for that same reason.

Zweibach avatar Jul 22 '22 23:07 Zweibach

HydrusNao and hatate-iqdb are great for batch jobs, but unwieldy for one-offs. Since there's already an API endpoint, I reckon it shouldn't be a lot of extra work to link that up in the UI. Though, this isn't a high priority request at all, I can cope for the time being

roachcord3 avatar Jul 23 '22 21:07 roachcord3

Hey, I think I've just added this in today's release! If the image is bigger than 1,024 pixels on a side, it offers a second bitmap copy option bounded to a 1,024x1,024 box. Let me know if it gives you any trouble!

hydrusnetwork avatar Jun 28 '23 21:06 hydrusnetwork

@hydrusnetwork I think it would be better to just copy the actual thumbnail. Then it would work for files hydrus can't display and would just be simplier. In my testing thumbnails work just fine for saucenao and such. In Hydrus Web for example all saucenao lookups use the thumbnail.

floogulinc avatar Jun 29 '23 01:06 floogulinc

@hydrusnetwork Thanks, so far it's pretty good! Works great on saucenao, I just copy the bitmap and press cmd-V and presto, I can search the image. I think the behavior of the option showing up when I have multiple files selected is a bit unintuitive, but I understand that it uses the one that's currently highlighted in the preview window just from trying it out, so I can use it just fine.

On that note, though, I agree with @floogulinc that being able to work with thumbnails would be nicer, especially because it would let you export (and maybe copy? I'm not sure how multiple-file clipboard contents work on each of the supported OSes) multiple thumbnails at once. I know that won't work for just pasting into saucenao since that site only does one file at a time, but it would make it easier to do batch operations.

With that said, for users who set their thumbnail settings super small, I bet using thumbnails wouldn't work too great, so it's not like having this bitmap option is bad. It might be nice to have both available as options, but it depends on whether you want to write the thumbnail export code and them support both code paths. I don't remember what the default thumbnail size is, but if it's small enough that it would make saucenao miss sometimes when the bitmap wouldn't, then this goes doubly. For me personally, my specific needs have been met; I'm only mentioning all this because I'm trying to think about solutions that work for as many people's workflows as possible, rather than just my own. Regardless, I'm very grateful you gave me a suitable solution for my own needs!

roachcord3 avatar Jul 04 '23 22:07 roachcord3