Class: Xberg::ImageOutputFormatNative

Inherits:
Data
  • Object
show all
Extended by:
T::Sig
Includes:
ImageOutputFormat
Defined in:
lib/xberg/native.rb

Overview

Preserve whatever format the extractor produced (default).

No re-encode pass is performed. ExtractedImage.format reflects the source format: JPEG for embedded PDF images, PNG for rasterised content, or the native container format from office documents.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_hash(hash) ⇒ Object



108
109
110
# File 'lib/xberg/native.rb', line 108

def self.from_hash(hash)
  new
end

Instance Method Details

#heif?Boolean

Returns:

  • (Boolean)


102
# File 'lib/xberg/native.rb', line 102

def heif? = false

#jpeg?Boolean

Returns:

  • (Boolean)


98
# File 'lib/xberg/native.rb', line 98

def jpeg? = false

#native?Boolean

Returns:

  • (Boolean)


94
# File 'lib/xberg/native.rb', line 94

def native? = true

#png?Boolean

Returns:

  • (Boolean)


96
# File 'lib/xberg/native.rb', line 96

def png? = false

#svg?Boolean

Returns:

  • (Boolean)


104
105
106
# File 'lib/xberg/native.rb', line 104

def svg? = false
# @param hash [Hash] deserialized from the native extension
# @return [self]

#webp?Boolean

Returns:

  • (Boolean)


100
# File 'lib/xberg/native.rb', line 100

def webp? = false