.toDataURL() is saving transparent image instead of actual image
toDataURL() is saving the black overlay/background, that is drawn on canvas; but not the image is drawn on the same canvas through a link. If I only draw an image and try to save it as an image, the transparent image is saved.
I have researched many things but nothing worked in my case.
The image for better understanding:

Here is the code:
Untitled Document