0

How would I get the copyright date from a bitmap?

private void toolStripMenuItemLoadImage_Click(object sender, EventArgs e)
{
    using (OpenFileDialog ofd = new OpenFileDialog())
    {
        ofd.Title = "Load Image";

        if (ofd.ShowDialog() == DialogResult.OK)
        {
            firstLoaded = new Bitmap(ofd.FileName);
            String details = //Grab the copyright date of the image here; 
            this.Invalidate();
        }
    }
    isLoaded = true;
}
ravuya
  • 8,586
  • 4
  • 30
  • 33
BigBug
  • 6,202
  • 23
  • 87
  • 138

2 Answers2

2

If you're asking to get the system-provided details, then you should look into shell functions (shell32.dll). Check out this SO post.

Basically, it's not saved in the bitmap itself, rather in the system. It contains like specified rating, user, details etc.

Community
  • 1
  • 1
Dmitry Reznik
  • 6,812
  • 2
  • 32
  • 27
0

Load the image into a bitmap object and access the exif data. See the second answer of this question: How to get the EXIF data from a file using C#

About access Time and co use the FileInfo class. See also the MSDN: http://msdn.microsoft.com/en-us/library/system.io.filesysteminfo.lastaccesstime.aspx

Community
  • 1
  • 1
rekire
  • 47,260
  • 30
  • 167
  • 264