You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Transparency from browserWindow.capturePage is lost after calling nativeImage.resize #12308
Resizing a nativeImage that is a product of calling BrowserWindow.capturePage should maintain transparency in all cases, not just when hardware acceleration is disabled
Actual behavior
Resizing a nativeImage that is a product of calling BrowserWindow.capturePage converts tranparent pixels to black. If you instantiate your app disabling the gpu / hardware acceleration (app.disableHardwareAcceleration) it works as one would expect.
How to reproduce
git clone https://github.com/countravioli/electron-native-image-resize-transparency-bug
cd electron-native-image-resize-transparency-bug
npm install
npm start
npm run start-works
npm start - will run the app normally, illustrating the bug. Two images are written in the directory at the same level as app.js (original.png and resized.png)
npm run start-works - will run the app with disableHardwareAcceleration showing things work. The same to pngs are created.
The app will quit when its done. If you are on mac the pngs will open in your default application associated with the file type.
Activity
nitsakh commentedon Apr 5, 2018
Related to #10994