I created an app which reads the JPEG meta data and stores it in the database, so that we can see if it has rogue characters. I can extract the meta data using below code but i am unable to extract copyright Status. Is there a way i can extract that?
var stream = new FileStream(file, FileMode.Open, FileAccess.Read);
var decoder = new JpegBitmapDecoder(stream, BitmapCreateOptions.None, BitmapCacheOption.None);
var metadata = decoder.Frames[0].Metadata as BitmapMetadata;
if (metadata != null)
{
dataGridView1.Rows.Add(file,
metadata.ApplicationName,
metadata.Author != null ? metadata.Author.Aggregate((old, val) => old ?? "" + "; " + val) : "",
metadata.CameraManufacturer,
metadata.CameraModel,
metadata.Comment,
metadata.Copyright,
metadata.DateTaken,
metadata.Format,
metadata.Keywords != null ? metadata.Keywords.Aggregate((old, val) => old ?? "" + "; " + val) : "",
metadata.Location,
metadata.Rating,
metadata.Subject,
metadata.Title,
metadata.GetQuery("/xmp/photoshop:Instructions"),
metadata.GetQuery("/xmp/xmpRights:UsageTerms/x-default"),
metadata.GetQuery("/xmp/photoshop:Credit")
);
}
Is it possible to get "Copyright status" from code? this is in Photoshop and we can view it in Photoshop.

There is no copyright field defined by JPEG. The Exif file format supports a copyright. Maybe others as well.
If you want the copyright information, you would have to determine if you have an Exif file. If so, you would have to look for an APP1 marker after the SOI marker, determine if it is an EXIF header, then search through the TIFF header embedded in the marker and look for a copyright tag.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With