Class: Xberg::ImageOutputFormatSvg
- Inherits:
-
Data
- Object
- Data
- Xberg::ImageOutputFormatSvg
- Extended by:
- T::Sig
- Includes:
- ImageOutputFormat
- Defined in:
- lib/xberg/native.rb
Overview
Output pure-vector SVG. Lossless. Raster sources are not re-encoded (a warning is emitted and the image bytes are left untouched).
When the source is already SVG, the bytes are passed through the
usvg sanitizer (strips external hrefs, JS event handlers, and
foreignObject elements) when [SvgOptions::sanitize] is true.
Requires the svg feature.
Class Method Summary collapse
Instance Method Summary collapse
- #heif? ⇒ Boolean
- #jpeg? ⇒ Boolean
- #native? ⇒ Boolean
- #png? ⇒ Boolean
- #svg? ⇒ Boolean
- #webp? ⇒ Boolean
Class Method Details
.from_hash(hash) ⇒ Object
2885 2886 2887 |
# File 'lib/xberg/native.rb', line 2885 def self.from_hash(hash) new end |
Instance Method Details
#heif? ⇒ Boolean
2879 |
# File 'lib/xberg/native.rb', line 2879 def heif? = false |
#jpeg? ⇒ Boolean
2875 |
# File 'lib/xberg/native.rb', line 2875 def jpeg? = false |
#native? ⇒ Boolean
2871 |
# File 'lib/xberg/native.rb', line 2871 def native? = false |
#png? ⇒ Boolean
2873 |
# File 'lib/xberg/native.rb', line 2873 def png? = false |
#svg? ⇒ Boolean
2881 2882 2883 |
# File 'lib/xberg/native.rb', line 2881 def svg? = true # @param hash [Hash] deserialized from the native extension # @return [self] |
#webp? ⇒ Boolean
2877 |
# File 'lib/xberg/native.rb', line 2877 def webp? = false |