How to Add JPEG EXIF TAGS (url,keywords..)

Magick.NET is an object-oriented C# interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick.NET
Post Reply
laleh
Posts: 1
Joined: 2019-07-14T10:54:10-07:00
Authentication code: 1152

How to Add JPEG EXIF TAGS (url,keywords..)

Post by laleh » 2019-07-14T11:03:00-07:00

Hi
I'm using Magick.NET-Q16-AnyCPU for mvc core2 .

I am trying to add exif tags to jpeg images, copyright and author and url and keyword but not working except copyright


My Code :

Code: Select all

  using (MagickImage image = new MagickImage(media.Name))
                {
                   var profile = new ExifProfile();
                    profile.SetValue(ExifTag.Copyright, Title);
                    profile.SetValue(ExifTag.Artist, "laleh");
                    profile.SetValue(ExifTag.XPKeywords, Encoding.UTF32.GetBytes("one two three"));
                    profile.SetValue(ExifTag.XPAuthor, Encoding.UTF32.GetBytes("one"));
                    image.AddProfile(profile);
		   image.Write( media.Name);
                }



Image
thank you
Last edited by laleh on 2019-07-14T11:11:00-07:00, edited 1 time in total.

User avatar
fmw42
Posts: 25138
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to Add JPEG EXIF TAGS (url,keywords..)

Post by fmw42 » 2019-07-14T11:09:37-07:00

Imagemagick does not currently allow for adding or modifying EXIF data. Use Exiftool.

Post Reply