How can I remove blank part of image using javascript?

Alberts Kresi - Aug 19 - - Dev Community

Image description

PNG image is taken from canvas.
But there is blank part.
This is the image.

How can I remove blank part of image using javascript?
If anyone knows, please help me.

Thank you.

. .
Terabox Video Player