using System.Windows.Media.Imaging; // ab .Net-Framework 3.0, 3.5 // im Beispiel wird anhand des Mimetyps getestet, ob die übergebene Datei ein jpeg ist static bool CheckIfJpeg(string sFileName) { BitmapDecoder bmDec = BitmapDecoder.Create(new Uri(sFileName), BitmapCreateOptions.None, BitmapCacheOption.None); // weitere Mime-Typen unter: http://www.webmaster-toolkit.com/mime-types.shtml return bmDec.CodecInfo.MimeTypes.Contains("image/jpeg"); }
Kategorien
-
Neueste Beiträge
- [SAP] Mailversand einrichten
- [SAP EWM] SAP EWM and SAP ERP integration via CIF
- [SAP] Nutzung der ALV-Anzeige im MM-Reporting
- [Raspberry Pi 4] Raspberry Pi als DNS Server
- [Raspberry Pi] SSH aktivieren
- [Raspberry Pi] Bootoptionen in der config.txt
- [Raspberry Pi 4] Bessere Youtube-Videoperformance in Google Chrome
- [Raspberry Pi 4] Direkt von SSD booten (ohne SD-Karte)
- [ABAP] Fixkontentabelle (T030) auslesen
- [SAPUI5] SAPUI5 Entwicklung mit SAP Business Application Studio (BAS)