Page 1 of 1

Image metadata

Posted: Tue Sep 08, 2026 6:26 pm
by cbrydon
Hello.

I have a report that has an ImageControl with its source as a url - something like "https:\\testingserver.abc.com\ImageTest.jpg".
I wanted to determine the date and time the photo was taken, hopefully by accessing the metadata for the image. and then display the date and time next to the image in the report.

I tried a number of different methods to access the EXIF metadata of the jpeg, but it seems that perhaps it is stripped before being displayed in the report.
The raw format of the image seems to be png. Does the report designer convert all images to png before they are displayed?

Here are a couple of tests I did in the Get Image Data event of the image control.

The image is not null
float zoom = 1;
var img = ((Stimulsoft.Report.Components.StiImage)sender).GetImage(ref zoom);
varTest img == null ? "NULL" : "NOT NULL";

I can access the image width
float zoom = 1;
var img = ((Stimulsoft.Report.Components.StiImage)sender).GetImage(ref zoom);
try
{
varTest = img.Width.ToString();
}
catch(Exception ex)
{
varTest = ex.GetType().Name + ": " + ex.Message;
}

The PropertyIDList is empty
float zoom = 1;
var img = ((Stimulsoft.Report.Components.StiImage)sender).GetImage(ref zoom);
try
{
varTest = img.PropertyIdList.Length.ToString();
}
catch(Exception ex)
{
varTest ex.GetType().Name + ": " + ex.Message;
}


I was able to determine the raw image format with this code.
float zoom = 1;
var img = ((Stimulsoft.Report.Components.StiImage)sender)
.GetImage(ref zoom);
varTest = img.RawFormat.ToString();


Is there a way to get the metadata prior to it being displayed in the report? Ultimately, I'd like to get the image date and time if it is possible.

Thank you,
Carl