Пример #1
0
        private static void Metadata(MagickImage image, ImageDetails details)
        {
            var xmp        = MetadataController.Get(details);
            var xmpBuffer  = XmpMetaFactory.SerializeToBuffer(xmp, new SerializeOptions());
            var xmpProfile = new XmpProfile(xmpBuffer);

            image.AddProfile(xmpProfile);

            var iptcProfile = new IptcProfile();

            iptcProfile.SetValue(IptcTag.City, "London");
            iptcProfile.SetValue(IptcTag.Country, "UK");
            iptcProfile.SetValue(IptcTag.Contact, "[email protected], +447740424810,http://www.mcandrewphoto.co.uk");

            iptcProfile.SetValue(IptcTag.CopyrightNotice, "Attribution 3.0 Unported (CC BY 3.0)");
            iptcProfile.SetValue(IptcTag.Title, $"{details.GivenName} {details.FamilyName}");

            iptcProfile.SetValue(IptcTag.Source, "Chris McAndrew / UK Parliament");
            iptcProfile.SetValue(IptcTag.Credit, "Chris McAndrew / UK Parliament (Attribution 3.0 Unported (CC BY 3.0))");

            image.AddProfile(iptcProfile);
        }
Пример #2
0
        public async Task <IXmpMeta> Get(string id)
        {
            var details = await ImageDetails.GetById(id);

            return(MetadataController.Get(details));
        }