Пример #1
0
 public void AddImage(ImageOnStorage image)
 {
     var item = new ManifestItemV3
     {
         HRef = image.PathInEPUB.GetRelativePath(DefaultInternalPaths.ContentFilePath, _flatStructure),
         ID = image.ID,
         MediaType = EPUBImage.ConvertImageTypeToMediaType(image.ImageType)
     };
     if (CoverId == image.ID)
     {
         item.CoverImage = true;
     }
     _manifest.Add(item);
 }
Пример #2
0
        private void AddImagesFiles(ZipOutputStream stream)
        {
            stream.SetLevel(9);
            foreach (var epubImage in _images)
            {
                var imageFile = new ImageOnStorage(epubImage.Value) {FileName = epubImage.Value.ID};
                CreateFileEntryInZip(stream,imageFile);
                stream.Write(epubImage.Value.ImageData, 0, epubImage.Value.ImageData.Length);
                _content.AddImage(imageFile);
            }

        }
Пример #3
0
 public void AddImage(ImageOnStorage image)
 {
     _manifest.Add(new ManifestItemV2 { HRef = image.PathInEPUB.GetRelativePath(DefaultInternalPaths.ContentFilePath, _flatStructure), ID = image.ID, MediaType = EPUBImage.ConvertImageTypeToMediaType(image.ImageType) });
 }