Beispiel #1
0
        private void UpdateView()
        {
            lvExif.Items.Clear();
            foreach (ExifProperty item in data.Properties.Values)
            {
                ListViewItem lvitem = new ListViewItem(item.Name);
                lvitem.SubItems.Add(item.ToString());
                lvitem.SubItems.Add(Enum.GetName(typeof(IFD), ExifTagFactory.GetTagIFD(item.Tag)));
                lvitem.Tag = item;
                lvExif.Items.Add(lvitem);
            }
            if (data.Thumbnail == null)
            {
                pbThumb.Image = null;
            }
            else
            {
                pbThumb.Image = data.Thumbnail.ToImage();
            }
            pbOrigin.Image = data.ToImage();

            lblThumbnail.Text     = "Thumbnail: " + (data.Thumbnail == null ? "None" : data.Thumbnail.ToImage().Width.ToString() + "x" + data.Thumbnail.ToImage().Height.ToString());
            pgExif.SelectedObject = data;

            lvExif.Sort();
        }
Beispiel #2
0
        private void ReadFile(string filename)
        {
            data = ExifFile.Read(filename);
            Settings.Default.Lastfile = filename;
            Settings.Default.Save();
            lvExif.Items.Clear();
            foreach (ExifProperty item in data.Properties.Values)
            {
                ListViewItem lvitem = new ListViewItem(item.Name);
                lvitem.SubItems.Add(item.ToString());
                lvitem.SubItems.Add(Enum.GetName(typeof(IFD), ExifTagFactory.GetTagIFD(item.Tag)));
                lvitem.Tag = item;
                lvExif.Items.Add(lvitem);
            }
            if (data.Thumbnail == null)
            {
                pbThumb.Image = null;
            }
            else
            {
                pbThumb.Image = data.Thumbnail.ToBitmap();
            }
#if DEBUG
            binaryMapViewer1.Map = data.Map;
#endif

            this.Text         = Path.GetFileName(filename) + " - Exif Test";
            lblStatus.Text    = Path.GetFileName(filename);
            lblByteOrder.Text = "Byte Order: " + (data.ByteOrder == BitConverterEx.ByteOrder.LittleEndian ? "Little-Endian" : "Big-Endian");
            lblThumbnail.Text = "Thumbnail: " + (data.Thumbnail == null ? "None" : data.Thumbnail.ToBitmap().Width.ToString() + "x" + data.Thumbnail.ToBitmap().Height.ToString());

            lvExif.Sort();
        }
Beispiel #3
0
 public ExifProperty(ExifTag tag)
 {
     mTag = tag;
     mIFD = ExifTagFactory.GetTagIFD(tag);
 }