Class: Thumbnail3mf
- Inherits:
-
Object
- Object
- Thumbnail3mf
- Defined in:
- lib/ruby3mf/thumbnail3mf.rb
Class Method Summary collapse
Class Method Details
.parse(doc, relationship_file, relationships) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/ruby3mf/thumbnail3mf.rb', line 3 def self.parse(doc, relationship_file, relationships) img_type = MimeMagic.by_magic(relationship_file.get_input_stream) Log3mf.context "Thumbnail3mf" do |l| l.debug "thumbnail is of type: #{img_type}" l.error "Expected a png or jpeg thumbnail but the thumbnail was of type #{img_type}", page: 12 unless ['image/png', 'image/jpeg'].include? img_type.type end end |