The day before yesterday did not want to find win10 lock screen wallpaper is very beautiful, think about can save it? Online A search did have information, then refer to the following connection
Http://jingyan.baidu.com/article/fedf07375ea25135ad897761.html
The procedure is very simple, the directory is C:\Users\XXX\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_XXX\LocalState\ Assets. But we finally see a bunch of garbled files, plus a. jpg to access. It feels very troublesome, and not all the files are full screen wallpapers!
Can write a search of small program, directly click on the automatic export wallpaper! Of course it is ok (or else this article is not ⊙▂⊙) ~ Specific ideas for solving the following
1, get the current display screen size, for the later to determine whether to prepare for full-screen wallpaper files
1 // Get the monitor screen size to determine the full-screen size of the wallpaper 2 double height = systemparameters.primaryscreenheight; 3 double width = systemparameters.primaryscreenwidth;
Get screen size
2. Get the folder where the final wallpaper is located (not very satisfied with 囧rz)
//The final wallpaper catalog stringTargetPath; //get Current User folder stringUserPath =Environment.getfolderpath (Environment.SpecialFolder.UserProfile); if(Directory.Exists (UserPath +@"\appdata\local\packages\")) { foreach(varItemfinchDirectory.getdirectories (UserPath +@"\appdata\local\packages\")) { //because this level of directory suffix is replaced, a fixed prefix is used to find the directory if(Itemf.indexof ("Microsoft.Windows.ContentDeliveryManager") >0) {TargetPath= itemf +@"\localstate\assets"; } } }
Get Wallpaper Catalog
3, judge whether it is a full screen wallpaper. Is the export, not the dog band ~ (here to determine whether it is a valid picture file, relatively rough.) If other good methods, welcome to point out? (´▽ '))
1 foreach(varItemwinchDirectory.GetFiles (TargetPath))2 {3 Try4 {5BitmapImage image =NewBitmapImage (NewUri (ITEMW));6 7 //There is no need to judge the height and width properties, because there is no guarantee that each picture is 96dpi8 if(Image. Pixelheight = = Height && image. Pixelwidth = =width)9 {TenFile.Copy (ITEMW, FilePath +string. Format (@"\{0}.jpg", ++i),true); One } A } - Catch(NotSupportedException ex) - { the //if it is not a picture file, continue processing - Continue; - } - Catch(Exception ex) + { - + } A}
judging and Importing wallpaper
The final procedure is as follows, altogether 5 wallpapers were found
All results are saved under the sibling directory assets (created by the program). Of course, these are my test, not Microsoft push, don't think more! Transmission Door
One click Search Win10 lock Screen Wallpaper