Class: Xberg::ImageOutputFormatJpeg
- Inherits:
-
Data
- Object
- Data
- Xberg::ImageOutputFormatJpeg
- Extended by:
- T::Sig
- Includes:
- ImageOutputFormat
- Defined in:
- lib/xberg/native.rb
Overview
Re-encode all extracted images as JPEG at the given quality level.
quality must be in 1..=100. Values outside this range are clamped
and a warning is emitted. Higher values produce larger files with less
artefacting; 85 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
2769 2770 2771 |
# File 'lib/xberg/native.rb', line 2769 def quality @quality end |
Class Method Details
.from_hash(hash) ⇒ Object
2791 2792 2793 |
# File 'lib/xberg/native.rb', line 2791 def self.from_hash(hash) new(quality: hash[:quality] || hash["quality"]) end |
Instance Method Details
#heif? ⇒ Boolean
2785 |
# File 'lib/xberg/native.rb', line 2785 def heif? = false |
#jpeg? ⇒ Boolean
2781 |
# File 'lib/xberg/native.rb', line 2781 def jpeg? = true |
#native? ⇒ Boolean
2777 |
# File 'lib/xberg/native.rb', line 2777 def native? = false |
#png? ⇒ Boolean
2779 |
# File 'lib/xberg/native.rb', line 2779 def png? = false |
#svg? ⇒ Boolean
2787 2788 2789 |
# File 'lib/xberg/native.rb', line 2787 def svg? = false # @param hash [Hash] deserialized from the native extension # @return [self] |
#webp? ⇒ Boolean
2783 |
# File 'lib/xberg/native.rb', line 2783 def webp? = false |