Skip to content

Commit 126ebd3

Browse files
committed
Add documentation with options you can pass to #save
1 parent 707b830 commit 126ebd3

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Grim.processor = Grim::MultiProcessor.new([
6363
pdf = Grim.reap('/path/to/pdf')
6464
```
6565

66-
It is also supported to use another ghostscript executable, which is especially interesting for windows users since the executable is named differently there.
66+
You can even specify a Windows executable :zap:
6767

6868
```ruby
6969
# specifying another ghostscript executable, win64 in this example
@@ -73,6 +73,19 @@ Grim.processor = Grim::ImageMagickProcessor.new({:ghostscript_path => "gswin64c
7373
pdf = Grim.reap('/path/to/pdf')
7474
```
7575

76+
`Grim::ImageMagickProcessor#save` supports several options as well:
77+
78+
```ruby
79+
pdf = Grim.reap("/path/to/pdf")
80+
pdf[0].save('/path/to/image.png', {
81+
:width => 600, # defaults to 1024
82+
:density => 72, # defaults to 300
83+
:quality => 60, # defaults to 90
84+
:colorspace => "CMYK", # defaults to "RGB"
85+
:alpha => "Activate" # not used when not set
86+
})
87+
```
88+
7689
## Reference
7790

7891
* [jonmagic.com: Grim](http://jonmagic.com/blog/archives/2011/09/06/grim/)

0 commit comments

Comments
 (0)