Class: Pdf::Reader::ExtractImages::Tiff
- Inherits:
-
Object
- Object
- Pdf::Reader::ExtractImages::Tiff
- Defined in:
- lib/pdf/reader/extract_images/tiff.rb
Instance Attribute Summary collapse
-
#stream ⇒ Object
readonly
Returns the value of attribute stream.
Instance Method Summary collapse
-
#initialize(stream) ⇒ Tiff
constructor
A new instance of Tiff.
- #save(filename) ⇒ Object
Constructor Details
#initialize(stream) ⇒ Tiff
Returns a new instance of Tiff.
5 6 7 |
# File 'lib/pdf/reader/extract_images/tiff.rb', line 5 def initialize(stream) @stream = stream end |
Instance Attribute Details
#stream ⇒ Object (readonly)
Returns the value of attribute stream.
3 4 5 |
# File 'lib/pdf/reader/extract_images/tiff.rb', line 3 def stream @stream end |
Instance Method Details
#save(filename) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/pdf/reader/extract_images/tiff.rb', line 9 def save(filename) k = stream.hash[:DecodeParms][:K] if !k.nil? && stream.hash[:DecodeParms][:K] <= 0 save_group_four(filename) else warn "#{filename}: CCITT non-group 4/2D image." end end |