Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
Luckily Google Chrome gives quite a few samples, one of which is taking a screenshot. I looked into that code, it didnt seem too complex. I will have to implement a chrome.tabs.captureVisibleTab(function(data) {...} handler which will be able to take the screenshot and then handle it. It also provided a screenshot in a separate tab. A quick test of it shows that it works and can see that it provides the data in a base64 format, which is exactly what I wanted to have. It included 'data:image/jpeg;base64,' which can be easily removed just leaving the base64 data left. Again I used that code, extracted the base64 and posted in Postman to see if it works and it does!
Github Link - https://github.com/rudaiyap/Netflix-Celeb-Recognition