public static void UpdateMetadataAttributesOnImage(GeckoElement img, PalasoImage imageInfo) { //see also Book.UpdateMetadataAttributesOnImage(), which does the same thing but on the document itself, not the browser dom img.SetAttribute("data-copyright", String.IsNullOrEmpty(imageInfo.Metadata.CopyrightNotice) ? "" : imageInfo.Metadata.CopyrightNotice); img.SetAttribute("data-creator", String.IsNullOrEmpty(imageInfo.Metadata.Creator) ? "" : imageInfo.Metadata.Creator); img.SetAttribute("data-license", imageInfo.Metadata.License == null ? "" : imageInfo.Metadata.License.ToString()); }
public void ChangePicture(string bookFolderPath, GeckoElement img, PalasoImage imageInfo, IProgress progress) { var imageFileName = ProcessAndCopyImage(imageInfo, bookFolderPath); img.SetAttribute("src", imageFileName); UpdateMetdataAttributesOnImgElement(img, imageInfo); }