Example #1
0
        private static string[] LargestImagesWithCustomFilePath(string[] customFilePath)
        {
            Image[] images = (from f in customFilePath select WallpaperManagerTools.GetImageFromFile(f)).ToArray();

            for (int i = 0; i < customFilePath.Length; i++) // sets file path for image objects
            {
                //? Note that the tag is empty beforehand | This is used to organize the images below based on their width and height
                images[i].Tag = customFilePath[i];
            }

            customFilePath = (from f in images orderby f.Width + f.Height descending select f.Tag.ToString()).ToArray();

            foreach (Image image in images)
            {
                image.Dispose();
            }

            return(customFilePath);
        }