Class: EideticPDF::PdfObjects::PdfImage
Instance Attribute Summary collapse
Attributes inherited from PdfStream
#stream
#gen, #seq
Instance Method Summary
collapse
Methods inherited from PdfStream
#length
#dictionary
#footer, #header, #reference_object, #reference_string, #to_s
Constructor Details
#initialize(seq, gen, stream = nil) ⇒ PdfImage
Returns a new instance of PdfImage.
517
518
519
520
|
# File 'lib/epdfo.rb', line 517
def initialize(seq, gen, stream=nil)
super(seq, gen, stream)
dictionary['Subtype'] = PdfName.new('Image')
end
|
Instance Attribute Details
#height ⇒ Object
Returns the value of attribute height.
515
516
517
|
# File 'lib/epdfo.rb', line 515
def height
@height
end
|
#width ⇒ Object
Returns the value of attribute width.
515
516
517
|
# File 'lib/epdfo.rb', line 515
def width
@width
end
|
Instance Method Details
#bits_per_component=(bits) ⇒ Object
545
546
547
|
# File 'lib/epdfo.rb', line 545
def bits_per_component=(bits)
dictionary['BitsPerComponent'] = PdfInteger.new(bits)
end
|
#body ⇒ Object
522
523
524
525
|
# File 'lib/epdfo.rb', line 522
def body
dictionary['Length'] = PdfInteger.new(stream.length)
super
end
|
#color_space=(color_space) ⇒ Object
549
550
551
552
553
554
555
556
|
# File 'lib/epdfo.rb', line 549
def color_space=(color_space)
if color_space.is_a?(String)
dictionary['ColorSpace'] = PdfName.new(color_space)
else
dictionary['ColorSpace'] = color_space
end
end
|
#decode=(decode) ⇒ Object
558
559
560
|
# File 'lib/epdfo.rb', line 558
def decode=(decode)
dictionary['Decode'] = decode
end
|
#filter=(filter) ⇒ Object
527
528
529
|
# File 'lib/epdfo.rb', line 527
def filter=(filter)
dictionary['Filter'] = PdfName.new(filter)
end
|
#filters=(filters) ⇒ Object
531
532
533
|
# File 'lib/epdfo.rb', line 531
def filters=(filters)
dictionary['Filter'] = filters
end
|
#image_mask=(image_mask) ⇒ Object
566
567
568
|
# File 'lib/epdfo.rb', line 566
def image_mask=(image_mask)
dictionary['ImageMask'] = PdfBoolean.new(image_mask)
end
|
#intent=(intent) ⇒ Object
570
571
572
|
# File 'lib/epdfo.rb', line 570
def intent=(intent)
dictionary['Intent'] = PdfName.new(intent)
end
|
#interpolate=(interpolate) ⇒ Object
562
563
564
|
# File 'lib/epdfo.rb', line 562
def interpolate=(interpolate)
dictionary['Interpolate'] = PdfBoolean.new(interpolate)
end
|