In general, I really had everything worked out with non-minified version of the library file, but as it turned out the images from which I wanted to get information were protected from the function of working with pixels through CORS. The only thing that I managed and that works at the moment is transferring the functionality into a background script and connecting the library file as a background script.