yellowbluesky / PixivforMuzei3

Best Pixiv plugin for Muzei 3
GNU General Public License v3.0
174 stars 15 forks source link

autocrop feature #135

Closed FluffyDiscord closed 3 years ago

FluffyDiscord commented 3 years ago

I got tired of hard included bars and blank spaces in images (just why would anyone do such a thing?)

Here's a feature. It may be a bit CPU intensive as it iterates over each pixel. If anyone has any better idea, fix it :D

It's optional and only available on Android 10+ (If someone wants to backport it for earlier versions, please do)

image

Comparisons:

Screenshot_1 Screenshot_2 Screenshot_3

yellowbluesky commented 3 years ago

Hi there! Thanks for adding this feature, it looks good!

I'm heading home from a holiday right now, I'll review and merge this tomorrow

FluffyDiscord commented 3 years ago

Just want to say that we should step by 3 pixels rather than 1 to make it process 3 times less pixels for each side while adding +3 pixels at the end for each side for the cropped size. Noone will notice, if the image will be cropped up to 3 more pixels than it should truly be and it won't take few seconds to process huge images anymore. I will change it a bit once I get home this evening.

FluffyDiscord commented 3 years ago

Hi, do you think it's ready for merge ?

yellowbluesky commented 3 years ago

I'll have another when I get home from work

yellowbluesky commented 3 years ago

I'm alright with merging it now

I'm still not 100% happy with the performance hit, but I can put in a message warning of higher power consumption while artwork is being downloaded.