imshaikot / video-thumb-generator

Capture thumbnails/screenshots from respective video over HTML5 environment
https://imshaikot.github.io/video-thumb-generator
MIT License
21 stars 1 forks source link

Feature Request: Mime Type and Quality #1

Open furey opened 4 years ago

furey commented 4 years ago

Hi! 👋

Thanks so much for your fantastic library!

Would you consider adding mime type and quality parameters to your type() method?

.type(['objectURL', 'image/jpeg', 0.95])

Looking at the repository source, I seed objectURL uses toBlob and base64 uses toDataURL—both HTMLCanvasElement methods that support additional mime type and quality arguments:

Hope this is a feature you'll consider implementing!

Cheers!

🤓👍

imshaikot commented 4 years ago

@furey Thank you for your consideration and suggestion. It sounds really good addition to the configuration. As I don't have any written test for this small library and I also wanted to add some unit tests. Therefore it may take a little while for me to add that feature.

You are more than welcome to make a pull request meanwhile and I can publish the update.

Thanks again.