Due to the limitations of HTML Canvas, if the image exceeds max width/height of 32767 then the image becomes empty.
To fix this, I have set the max limit of width and height to 32767. The ERD diagram will be cut if it exceeds the limit. The ERD tool will also throw an alert to inform the user in that case.