diff --git a/src/UglyToad.PdfPig.Tests/TestPdfImage.cs b/src/UglyToad.PdfPig.Tests/TestPdfImage.cs index 69a7212a..8c6380cf 100644 --- a/src/UglyToad.PdfPig.Tests/TestPdfImage.cs +++ b/src/UglyToad.PdfPig.Tests/TestPdfImage.cs @@ -6,6 +6,7 @@ using UglyToad.PdfPig.Graphics.Colors; using UglyToad.PdfPig.Graphics.Core; using UglyToad.PdfPig.Images.Png; + using UglyToad.PdfPig.Tokens; public class TestPdfImage : IPdfImage { @@ -31,6 +32,8 @@ public bool IsInlineImage { get; set; } + public DictionaryToken ImageDictionary { get; set; } + public ColorSpaceDetails ColorSpaceDetails { get; set; } public IReadOnlyList DecodedBytes { get; set; } diff --git a/src/UglyToad.PdfPig/Content/IPdfImage.cs b/src/UglyToad.PdfPig/Content/IPdfImage.cs index 83cd6d46..80dc2a9a 100644 --- a/src/UglyToad.PdfPig/Content/IPdfImage.cs +++ b/src/UglyToad.PdfPig/Content/IPdfImage.cs @@ -3,7 +3,8 @@ using System.Collections.Generic; using Core; using Graphics.Colors; - using Graphics.Core; + using Graphics.Core; + using UglyToad.PdfPig.Tokens; using XObjects; /// @@ -84,6 +85,11 @@ /// bool IsInlineImage { get; } + /// + /// The full dictionary for this image object. + /// + public DictionaryToken ImageDictionary { get; } + /// /// Full details for the with any associated data. /// diff --git a/src/UglyToad.PdfPig/Content/InlineImage.cs b/src/UglyToad.PdfPig/Content/InlineImage.cs index 4380a82d..152bf37d 100644 --- a/src/UglyToad.PdfPig/Content/InlineImage.cs +++ b/src/UglyToad.PdfPig/Content/InlineImage.cs @@ -8,8 +8,9 @@ using Graphics.Colors; using Graphics.Core; using Tokens; - using Images.Png; - + using Images.Png; + using UglyToad.PdfPig.Util.JetBrains.Annotations; + /// /// /// A small image that is completely defined directly inline within a 's content stream. @@ -42,6 +43,10 @@ /// public bool IsInlineImage { get; } = true; + /// + [NotNull] + public DictionaryToken ImageDictionary { get; } + /// public RenderingIntent RenderingIntent { get; } @@ -76,6 +81,7 @@ IsImageMask = isImageMask; RenderingIntent = renderingIntent; Interpolate = interpolate; + ImageDictionary = streamDictionary; RawBytes = bytes; ColorSpaceDetails = colorSpaceDetails; diff --git a/src/UglyToad.PdfPig/XObjects/XObjectImage.cs b/src/UglyToad.PdfPig/XObjects/XObjectImage.cs index 7fc7c81a..eca51e3a 100644 --- a/src/UglyToad.PdfPig/XObjects/XObjectImage.cs +++ b/src/UglyToad.PdfPig/XObjects/XObjectImage.cs @@ -6,7 +6,6 @@ using Core; using Graphics.Colors; using Graphics.Core; - using Images; using Images.Png; using Tokens; using Util.JetBrains.Annotations; @@ -57,9 +56,7 @@ /// public bool IsInlineImage { get; } = false; - /// - /// The full dictionary for this Image XObject. - /// + /// [NotNull] public DictionaryToken ImageDictionary { get; }