Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


transparency and pdf #11

wants to merge 5 commits into from

2 participants


added -flatten option to imagemagick to remove transparency. As without this option, jpg image of pdf files that contain transparency are exported with an ugly black background


I'll take a look at this as soon as I get home from traveling, probably sometime Tuesday.


either add the "-flatten" or "-alpha", "remove"
Thanks a lot

@jonmagic jonmagic closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/grim/image_magick_processor.rb
2  lib/grim/image_magick_processor.rb
@@ -23,7 +23,7 @@ def save(pdf, index, path, options)
width = options.fetch(:width, Grim::WIDTH)
density = options.fetch(:density, Grim::DENSITY)
quality = options.fetch(:quality, Grim::QUALITY)
- command = [@imagemagick_path, "-resize", width.to_s, "-antialias", "-render",
+ command = [@imagemagick_path, "-flatten", "-resize", width.to_s, "-antialias", "-render",
"-quality", quality.to_s, "-colorspace", "RGB",
"-interlace", "none", "-density", density.to_s,
"#{Shellwords.shellescape(pdf.path)}[#{index}]", path]
Something went wrong with that request. Please try again.