using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Drawing; namespace ConsoleApplication2 { class Program { static void Main(string[] args) { try { string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + @"\temp\mybmp.jpg"; Bitmap image = new Bitmap(path, true); Console.WriteLine(image.PixelFormat); } catch { System.Console.WriteLine("Something broke during the read!"); } }
Console.WriteLine("Press a key..."); Console.ReadKey();
Main
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)