简体   繁体   English

电子将图像设置为墙纸(OS X和Windows)

[英]Electron set image as wallpaper (OS X and Windows)

How do I go about setting an image as the wallpaper on OS X and Windows? 如何在OS X和Windows上将图像设置为墙纸? I've looked through the documentation but can't find information on this. 我已经浏览了文档,但是找不到有关此信息。

It's not in the Electron documentation because its not an Electron issue in the first place. 它不在Electron文档中,因为首先它不是Electron问题。

Use the library ' wallpaper ' which can be found on NPMjs and installed via 使用可以在NPMjs找到并通过以下方式安装的库“ Wallpaper

npm install --save wallpaper

You can use this module for electron. 您可以将此模块用于电子。

$ npm install wallpaper

Note that this module works only for macOS 10.12+, Linux, and Windows 10+. 请注意,此模块仅适用于macOS 10.12 +,Linux和Windows 10+。 as on 8th April, 2019 截至2019年4月8日

I am finding some solution to work on Windows 7 too. 我也在寻找在Windows 7上也可以使用的解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在JavaScript Windows 8应用程序中设置桌面墙纸 - Set desktop wallpaper in JavaScript Windows 8 Application 设置 browserWindow 始终在顶部,即使其他应用程序/游戏全屏 [Electron,Windows OS] - Set browserWindow Always on top, Even if Other Apps/Games are in fullscreen [Electron, Windows OS] 本机菜单未显示 OS X Electron - Native Menus not showing OS X Electron 使用Mozactivity Firefox OS将前置图像用作墙纸 - Use a prepended image as wallpaper using Mozactivity Firefox OS Electron 无法在 OS X 上构建平台依赖项 fsevents 和/或 sqllite - Electron cannot build platform dependencies fsevents and/or sqllite on OS X 电子生成器未在 Mac OS X 上发布到 GitHub - electron-builder Not Publishing to GitHub on Mac OS X 禁用放大镜,设置墙纸并在Google Chrome中保存图像的代码? - Code to disable magnifier, set wallpaper, and save image in Google Chrome? 停止长按/在android webview中单击图像上的“设置为墙纸” - Stop 'set as wallpaper' on image long press / click in android webview 如何在电子应用程序中设置窗口缩略图工具栏 - how to set windows thumbnail toolbar in electron application 有没有办法在 Electron 中为子窗口设置属性? - Is there a way to set attributes for child windows in Electron?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM