Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use +repage option? #107

Closed
NARKOZ opened this issue Dec 4, 2012 · 2 comments
Closed

How to use +repage option? #107

NARKOZ opened this issue Dec 4, 2012 · 2 comments

Comments

@NARKOZ
Copy link

NARKOZ commented Dec 4, 2012

From GraphicsMagick docs:

Use +repage to set the image page offsets to default.

http://www.graphicsmagick.org/GraphicsMagick.html#details-repage

Here is an example command:

convert logo.png \
  -resize 160x -resize 'x160<'  -resize 50% \
  -gravity center  -crop 80x80+0+0 +repage space_fill_2.jpg

In Ruby with mini_magick:

image.combine_options do |c|
  c.resize '160x'
  c.resize 'x160<'
  c.resize '50%'
  c.gravity 'center'
  c.crop "80x80+0+0"
  c.repage
end

This sends -repage and it throws error:

MiniMagick::Error: Command ("gm mogrify -resize 160x -resize x160< -resize 50% -gravity center -crop 80x80+0+0 -repage logo.png") failed: {:status_code=>1, :output=>"gm mogrify: Option '-repage' requires an argument or argument is malformed.\n"}
from --/bundler/gems/minimagick-34a9776b0002/lib/mini_magick.rb:420:in `run'
@NARKOZ
Copy link
Author

NARKOZ commented Dec 5, 2012

c.repage.+

Not obvious and not documented.

@NARKOZ NARKOZ closed this as completed Dec 5, 2012
@thiagofm
Copy link
Member

thiagofm commented Dec 5, 2012

@NARKOZ feel free to document it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants