FooSoft / yomichan

Japanese pop-up dictionary extension for Chrome and Firefox.
https://foosoft.net/projects/yomichan
Other
1.06k stars 223 forks source link

[Feature Request] Make anki card screenshot file lighter #2230

Closed brainexcerpts closed 2 years ago

brainexcerpts commented 2 years ago

Anki integration is awesome. it would be even better if the screenshot were not using lossless png but jpg or something more memory efficient instead. A on the fly resizing option or something that allows the user to somewhat control the file size would be very welcome especially on high resolution screens.

toasted-nutbread commented 2 years ago

There is a Quality (%) option that you can use when the format is JPEG. The lower the value, the lower the file size will be.

brainexcerpts commented 2 years ago

@toasted-nutbread unless I'm missing something yomichan will always produce a .png when using the {screenshot} tag to create an Anki card. There is no option inside yomichan to produce a .jpg.

I'm well aware JPEG file format itself provides a quality parameter, for now I'm forced to batch convert all png produced by yomichan to 80% quality jpg and resized to a max of 800px which works fine with on average 80kb file size. But it's not ideal since it adds some extra manual labor. Currently a .png screenshot with my screen high resolution will weigh about 1 to 2MB. Which means at least 1 gigabyte every 1000 card that's a lot to take in for AnkiWeb and reaching 5000 cards is not something unusual if you do a lot of learning.

Mar2ck commented 2 years ago

There is no option inside yomichan to produce a .jpg.

Have you not seen this option? image

brainexcerpts commented 2 years ago

Oh, I see it now! I swear I searched for it before posting and again after @toasted-nutbread answered me, but like we say "the third time's the charm"... So on the third check I discovered that you need to toggle the "advanced" button on the bottom right corner. how embarrassing... Thank you so much! @Mar2ck and really yomichan has an impressive set of features.

toasted-nutbread commented 2 years ago

I had forgotten that that option was behind the Advanced flag, apologies for not pointing that out. Thanks @Mar2ck!