potrace icon indicating copy to clipboard operation
potrace copied to clipboard

Feature request: potrace color option -C #rrggbb, --color #rrggbb

Open leandro2222 opened this issue 7 years ago • 1 comments

this potrace option would be useful in the cases when we have a black image on transparent background because the current javascript version transforms the alpha channel in black so dark pictures with transparent backgrounds don't show up.

example

ps: great work, thanks and congratulations.

leandro2222 avatar Apr 24 '17 00:04 leandro2222

Workaround that I'm currently using to let the alpha white (don't work in Firefox and MS Edge when the image comes from the clipboard because their clipboard dont support alpha):

function loadCanvas() { imgCanvas.width = imgElement.width; imgCanvas.height = imgElement.height; var ctx = imgCanvas.getContext('2d'); ctx.beginPath(); ctx.rect(0, 0, imgElement.width, imgElement.height); ctx.fillStyle = "white"; ctx.fill(); ctx.drawImage(imgElement, 0, 0); }

example

DEMO

leandro2222 avatar Apr 24 '17 01:04 leandro2222