Class: Xberg::ImageOutputFormatHeif
- Inherits:
-
Data
- Object
- Data
- Xberg::ImageOutputFormatHeif
- Extended by:
- T::Sig
- Includes:
- ImageOutputFormat
- Defined in:
- lib/xberg/native.rb
Overview
Re-encode all extracted images as HEIF/HEIC 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.
The encode path requires the heic feature; on builds without it, selecting
this variant returns an EncodeFailed warning and leaves the image untouched.
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
2832 2833 2834 |
# File 'lib/xberg/native.rb', line 2832 def quality @quality end |
Class Method Details
.from_hash(hash) ⇒ Object
2854 2855 2856 |
# File 'lib/xberg/native.rb', line 2854 def self.from_hash(hash) new(quality: hash[:quality] || hash["quality"]) end |
Instance Method Details
#heif? ⇒ Boolean
2848 |
# File 'lib/xberg/native.rb', line 2848 def heif? = true |
#jpeg? ⇒ Boolean
2844 |
# File 'lib/xberg/native.rb', line 2844 def jpeg? = false |
#native? ⇒ Boolean
2840 |
# File 'lib/xberg/native.rb', line 2840 def native? = false |
#png? ⇒ Boolean
2842 |
# File 'lib/xberg/native.rb', line 2842 def png? = false |
#svg? ⇒ Boolean
2850 2851 2852 |
# File 'lib/xberg/native.rb', line 2850 def svg? = false # @param hash [Hash] deserialized from the native extension # @return [self] |
#webp? ⇒ Boolean
2846 |
# File 'lib/xberg/native.rb', line 2846 def webp? = false |