maximegris / angular-electron

Ultra-fast bootstrapping with Angular and Electron :speedboat:
https://www.maximegris.fr/angular-electron/
MIT License
5.64k stars 1.37k forks source link

How can I change the splash screen image? #788

Closed Haytam95 closed 8 months ago

Haytam95 commented 9 months ago

Hi ! First of all, thanks for this great boilerplate.

I have a quick question, how can I change the splashScreen when the application is starting?

By default it has in the file electron-builder.json and builder-effective-config.yaml

"portable": {
    "splashImage": "dist/assets/icons/electron.bmp"
  },

I tried changing that to another image (electron.jpg for example), but the new splash never displays. Is there any requirement for the image or somewhere else to change?

erwinvanlun commented 9 months ago

change src/assets/background.jpg?

Haytam95 commented 9 months ago

I tried changing that image (it's a bmp) and nothing is shown during the startup

Edit: I don't want to change the background, but the "Electron is loading" splash screen

maximegris commented 8 months ago

The documentation is not clear about that but first be sure your new image is a bitmap with 24bit and nonzero resolution. Check this thread, it gives you tools to convert your .bmp image to 24bit file. I tried with Paint it worked.

Then you can find electron.bmp file in assets/icons folder.

Two way to replace the splash image :

Finally don't forget to run npm run electron:build to apply changes on your app.

Haytam95 commented 8 months ago

Thanks!