C# image /xmp/projectionType setquery error: (add image meta data /xmp/projectionType)

My goal is set value to "/xmp/projectionType" meta data for jpeg image.

I can set "text/descryption" by following code but error throwing when I try to set value for "/xmp/ProjectionType"

 using (FileStream fs = new FileStream(@"fullfilePath",FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite))
            {
                BitmapSource img = BitmapFrame.Create(fs);
                BitmapMetadata md = (BitmapMetadata)img.Metadata.Clone();
                // below set query working fine
                md.SetQuery("/Text/Description", "Have a nice day.");
                // below set query throws error
                md.SetQuery("/xmp/ProjectionType", "equirectangular");
            }

Ошибка:

Произошло необработанное исключение типа "System.ArgumentException" в PresentationCore.dll

Дополнительная информация: значение не попадает в ожидаемый диапазон.

How to insert "/xmp/projectionType"?

0 ответов

Другие вопросы по тегам