Class: Xberg::ImageOutputFormatWebp
- Inherits:
-
Data
- Object
- Data
- Xberg::ImageOutputFormatWebp
- Extended by:
- T::Sig
- Includes:
- ImageOutputFormat
- Defined in:
- lib/xberg/native.rb
Overview
Re-encode all extracted images as WebP at the given quality level.
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
Returns the value of attribute quality.
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)
Returns the value of attribute quality
2799 2800 2801 |
# File 'lib/xberg/native.rb', line 2799 def quality @quality end |
Class Method Details
.from_hash(hash) ⇒ Object
2821 2822 2823 |
# File 'lib/xberg/native.rb', line 2821 def self.from_hash(hash) new(quality: hash[:quality] || hash["quality"]) end |
Instance Method Details
#heif? ⇒ Boolean
2815 |
# File 'lib/xberg/native.rb', line 2815 def heif? = false |
#jpeg? ⇒ Boolean
2811 |
# File 'lib/xberg/native.rb', line 2811 def jpeg? = false |
#native? ⇒ Boolean
2807 |
# File 'lib/xberg/native.rb', line 2807 def native? = false |
#png? ⇒ Boolean
2809 |
# File 'lib/xberg/native.rb', line 2809 def png? = false |
#svg? ⇒ Boolean
2817 2818 2819 |
# File 'lib/xberg/native.rb', line 2817 def svg? = false # @param hash [Hash] deserialized from the native extension # @return [self] |
#webp? ⇒ Boolean
2813 |
# File 'lib/xberg/native.rb', line 2813 def webp? = true |