Class: Kreuzberg::ImageOutputFormatHeif
- Inherits:
-
Data
- Object
- Data
- Kreuzberg::ImageOutputFormatHeif
- Extended by:
- T::Sig
- Includes:
- ImageOutputFormat
- Defined in:
- lib/kreuzberg/native.rb
Overview
Re-encode all extracted images as HEIF/HEIC at the given quality level.
Requires the ‘heic` feature. `quality` must be in `1..=100`. Values outside this range are clamped and a warning is emitted. 80 is a reasonable default.
Instance Attribute Summary collapse
-
#quality ⇒ Object
readonly
rubocop:disable Lint/UselessMethodDefinition.
Class Method Summary collapse
Instance Method Summary collapse
- #heif? ⇒ Boolean
- #jpeg? ⇒ Boolean
- #native? ⇒ Boolean
- #png? ⇒ Boolean
- #svg? ⇒ Boolean
- #webp? ⇒ Boolean
Instance Attribute Details
#quality ⇒ Object (readonly)
rubocop:disable Lint/UselessMethodDefinition
167 168 169 |
# File 'lib/kreuzberg/native.rb', line 167 def quality @quality end |
Class Method Details
.from_hash(hash) ⇒ Object
189 190 191 |
# File 'lib/kreuzberg/native.rb', line 189 def self.from_hash(hash) new(quality: hash[:quality] || hash["quality"]) end |
Instance Method Details
#heif? ⇒ Boolean
183 |
# File 'lib/kreuzberg/native.rb', line 183 def heif? = true |
#jpeg? ⇒ Boolean
179 |
# File 'lib/kreuzberg/native.rb', line 179 def jpeg? = false |
#native? ⇒ Boolean
175 |
# File 'lib/kreuzberg/native.rb', line 175 def native? = false |
#png? ⇒ Boolean
177 |
# File 'lib/kreuzberg/native.rb', line 177 def png? = false |
#svg? ⇒ Boolean
185 186 187 |
# File 'lib/kreuzberg/native.rb', line 185 def svg? = false # @param hash [Hash] deserialized from the native extension # @return [self] |
#webp? ⇒ Boolean
181 |
# File 'lib/kreuzberg/native.rb', line 181 def webp? = false |