【分享】如何提取Windows 10锁屏壁纸/如何提取Windows聚焦图片

原创文章,转载请注明: 转载自勤奋的小青蛙
本文链接地址: 【分享】如何提取Windows 10锁屏壁纸/如何提取Windows聚焦图片

Windows 10的锁屏壁纸如果设置的是Windows聚焦的话,那么Windows就会推送优质的壁纸到锁屏界面上。

但是微软并没有提供这些壁纸的下载,那么在系统里我们怎么找到它们呢?其实,它们目录可以通过如下访问到:

按下键盘的「Win+R」,调出“运行”窗口,然后输入下面的路径并点确定:

%localappdata%\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets

这样就打开了该锁屏壁纸文件目录,如下所示:

getbg

但是我们看到并不是图片,其实只需要给加个后缀 .jpg 就可以看到图片了。

Snipaste_2018-08-16_13-52-12

另外想通过脚本一键提取的话,可以参考下面文章:

怎样简单保存下载 Windows 10 随机聚焦锁屏壁纸?一键提取脚本+图文教程

另外附上提取脚本,要用Windows系统的powershell进行执行才可以:

add-type -AssemblyName System.Drawing
New-Item "$($env:USERPROFILE)\Pictures\Spotlight" -ItemType directory -Force;
New-Item "$($env:USERPROFILE)\Pictures\Spotlight\CopyAssets" -ItemType directory -Force;
New-Item "$($env:USERPROFILE)\Pictures\Spotlight\Horizontal" -ItemType directory -Force;
New-Item "$($env:USERPROFILE)\Pictures\Spotlight\Vertical" -ItemType directory -Force;
foreach($file in (Get-Item "$($env:LOCALAPPDATA)\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets\*"))
{
    if ((Get-Item $file).length -lt 100kb) { continue }
    Copy-Item $file.FullName "$($env:USERPROFILE)\Pictures\Spotlight\CopyAssets\$($file.Name).jpg";
}

foreach($newfile in (Get-Item "$($env:USERPROFILE)\Pictures\Spotlight\CopyAssets\*"))
{
    $image = New-Object -comObject WIA.ImageFile;
    $image.LoadFile($newfile.FullName);
    if($image.Width.ToString() -eq "1920"){ Move-Item $newfile.FullName "$($env:USERPROFILE)\Pictures\Spotlight\Horizontal" -Force; }
    elseif($image.Width.ToString() -eq "1080"){ Move-Item $newfile.FullName "$($env:USERPROFILE)\Pictures\Spotlight\Vertical" -Force; }
}
Remove-Item "$($env:USERPROFILE)\Pictures\Spotlight\CopyAssets\*";

另外如果执行powershell脚本遇到如下错误:

因为在此系统上禁止运行脚本。有关详细信
息,请参阅 https:/go.microsoft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。
所在位置 行:1 字符: 1
+ save-spotlight.ps1
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [],PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess

那么请参考如下解决方案:

PowerShell因为在此系统中禁止执行脚本解决方法

原创文章,转载请注明: 转载自勤奋的小青蛙
本文链接地址: 【分享】如何提取Windows 10锁屏壁纸/如何提取Windows聚焦图片

文章的脚注信息由WordPress的wp-posturl插件自动生成



|2|left
打赏

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: