svg2img 0.2.0-arm64-darwin → 0.2.1-arm64-darwin
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/lib/svg2img/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1327aaa5f89ae4ed5651eb77ba9b339f126b2919c82707f0a08958444c1f332
|
4
|
+
data.tar.gz: 47145c078434ce97c6f25cc12981b4f23073599256d8f40128bfe214931ba888
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d38c90bdd505c1c8a345fe6183f9adde5bb3ad4d2bd00c252f33b750b5b51e0fbae8ac3f6d37ceec36d7fc9f14442b03e1bf4a8e70b65b6ecee7cf488b08e8b
|
7
|
+
data.tar.gz: 209a4af810cfc6ffec9e3345df9270c9df1afb16b220489f54ea92f67933c70884fceac7d60420c1236d50c3ed421b5434c83cfed3d7a27fe1cfdf467b2b4acb
|
data/README.md
CHANGED
@@ -40,6 +40,11 @@ bundle lock --add-platform arm64-darwin # Apple Silicon MacOS (i.e. M1)
|
|
40
40
|
|
41
41
|
## Usage
|
42
42
|
|
43
|
+
```ruby
|
44
|
+
require "svg2img"
|
45
|
+
Svg2Img.process_svg(svg_string, options)
|
46
|
+
```
|
47
|
+
|
43
48
|
Example usage:
|
44
49
|
|
45
50
|
```ruby
|
@@ -66,6 +71,7 @@ send_data(png_data, type: 'image/png', disposition: 'inline')
|
|
66
71
|
### Options
|
67
72
|
|
68
73
|
- `format` - output format, one of `:png`, `:jpg`, `:webp`, `:gif`
|
74
|
+
- `output_path` - path to the output image. If not provided, a temporary file will be created and the path to it will be returned.
|
69
75
|
- `size` - size of the output image as a proc that receives the width and height of the SVG and returns an array with the width and height of the output image. If the provides size has a different aspect ratio than the SVG, the image will be resized to fit in the center of the provided size. If not provided, the output image will have the same size as the SVG.
|
70
76
|
|
71
77
|
## Development
|
data/lib/svg2img/version.rb
CHANGED