I tried the bitmap class and the information stored in PropertyItems doesn't appear to have any stable diffusion prompt information (eve if the Id isn't 0x0010). Any help would be appreciated.
using (var image = new Bitmap(imagePath))
{
// Get the metadata property items
var propertyItems = image.PropertyItems;
// Find the Stable Diffusion prompt property
var stableDiffusionPrompt = Array.Find(propertyItems, p => p.Id == 0x0110); // 0x0110 is the ID for the Stable Diffusion prompt property
if (stableDiffusionPrompt != null)
{
string prompt = GetStringFromProperty(stableDiffusionPrompt);
Debug.WriteLine($"Stable Diffusion Prompt: {prompt}");
}
else
{
Debug.WriteLine("Stable Diffusion Prompt not found in the image metadata.");
}
}