electron-toolkit icon indicating copy to clipboard operation
electron-toolkit copied to clipboard

TypeError: pngNative.toPng is not a function

Open joernroeder opened this issue 7 years ago • 1 comments

just gave this project a try, dropped a svg into the icon generator and got the following error

Uncaught TypeError: pngNative.toPng is not a function
    at Function.dataUriToBuf (/electron-toolkit/app/ImageUtils.js:48)
    at Image.img.onload (/electron-toolkit/app/ImageUtils.js:62)

joernroeder avatar Aug 24 '18 09:08 joernroeder

.toPng was renamed to toPNG in electron v2. 😖 https://electronjs.org/docs/api/native-image#imagetopngoptions

joernroeder avatar Aug 24 '18 09:08 joernroeder