public FilePairValidationInfo(EXIF exifDataInit)
 {
     ExifData             = exifDataInit;
     _hasValidMatchingXML = false;
     _filePairsAreValid   = false;
     ValidationStatus     = "No matching XML found";
 }
Exemplo n.º 2
0
        private static EXIF ValidateImage(string imagePath)
        {
            try
            {
                EXIF exifData = new EXIF(imagePath);
                // Building the EXIF object should be enough for now, further EXIF validation can take place here.
                return(exifData);
            }
            catch (Exception e)
            {
#if DEBUG
                Trace.WriteLine(e.Message + "\n" + e.StackTrace);
#else
                Console.WriteLine("ERROR: " + e.Message);
#endif
                return(null);
            }
        }
Exemplo n.º 3
0
        private static bool ValidateXMLAgainstEXIF(string xmlPath, EXIF matchingImageData)
        {
            // Here we will check if the XML file's data (image type) matches the EXIF data's
            XmlDocument xDoc = new XmlDocument();

            try
            {
                xDoc.LoadXml(xmlPath);
            }catch (Exception e)
            {
#if DEBUG
                Trace.WriteLine(e.Message + "\n" + e.StackTrace);
#else
                Console.WriteLine("ERROR: " + e.Message);
#endif
                return(false);
            }
            return(true);
        }