Class: HexaPDF::Content::Operator::InlineImage

Inherits:
BaseOperator
  • Object
show all
Defined in:
lib/hexapdf/content/operator.rb

Overview

Implementation of the ‘BI’ operator which handles the complete inline image, i.e. the ‘ID’ and ‘EI’ operators are never encountered.

See: PDF2.0 s8.9.7

Instance Attribute Summary

Attributes inherited from BaseOperator

#name

Instance Method Summary collapse

Methods inherited from BaseOperator

#invoke

Constructor Details

#initializeInlineImage

Creates the operator.



677
678
679
# File 'lib/hexapdf/content/operator.rb', line 677

def initialize
  super('BI')
end

Instance Method Details

#serialize(serializer, dict, data) ⇒ Object

:nodoc:



681
682
683
684
685
686
687
688
# File 'lib/hexapdf/content/operator.rb', line 681

def serialize(serializer, dict, data) #:nodoc:
  result = +"BI\n"
  dict.each do |k, v|
    result << serializer.serialize_symbol(k) << ' '
    result << serializer.serialize(v) << ' '
  end
  result << "ID\n" << data << "EI\n"
end