Skip to content

Commit

Permalink
Minor tidy of XObject inline-content() method
Browse files Browse the repository at this point in the history
  • Loading branch information
dwarring committed Oct 29, 2024
1 parent 8e7cdee commit c60aee4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/PDF/Content/XObject.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,14 @@ role PDF::Content::XObject['Image']
}

method inline-content {

# for serialization to content stream ops: BI dict ID data EI
use PDF::Content::Ops :OpCode;
use PDF::COS::Util :ast-coerce;
# serialize to content ops
my %dict = ast-coerce(self).value.list;
%dict<Length>:delete;
my %xo-dict = ast-coerce(self).value.list;
%xo-dict<Length>:delete;
my %dict = self.inline-to-xobject(%xo-dict, :invert );
%dict<L> = $.encoded.codes; # Length is mandatory in PDF 2.0
%dict = self.inline-to-xobject( %dict, :invert );

[ (BeginImage) => [ ],
(ImageData) => [ :%dict, :$.encoded ],
Expand Down

0 comments on commit c60aee4

Please sign in to comment.