Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added more options for graphicsmagick

	modified:   src/gm_options.erl
  • Loading branch information...
commit 0a592fda0172a05b41e9335faad42fda45cc8934 1 parent 0a34b38
@julienmarie julienmarie authored
Showing with 25 additions and 1 deletion.
  1. +25 −1 src/gm_options.erl
View
26 src/gm_options.erl
@@ -35,4 +35,28 @@ opt({crop, Width, Height, XOffset, YOffset}) ->
{y_offset, integer_to_list(YOffset)}
]};
opt({edge, Radius}) ->
- {"-edge", ":radius", [{radius, integer_to_list(Radius)}]}.
+ {"-edge", ":radius", [{radius, integer_to_list(Radius)}]};
+opt({size, Width, Height}) ->
+ {"-size", ":widthx:height", [
+ {width, integer_to_list(Width)},
+ {height, integer_to_list(Height)}
+ ]};
+opt({thumbnail, Width, Height}) ->
+ {"-thumbnail", ":widthx:height^", [
+ {width, integer_to_list(Width)},
+ {height, integer_to_list(Height)}
+ ]};
+opt({gravity, Gravity}) ->
+ {"-gravity", ":gravity", [{gravity, Gravity}]};
+opt({quality, Quality}) ->
+ {"-quality", ":quality", [{quality, integer_to_list(Quality)}]};
+opt({extent, Width, Height}) ->
+ {"-extent", ":widthx:height", [
+ {width, integer_to_list(Width)},
+ {height, integer_to_list(Height)}
+ ]};
+opt({type, Type}) ->
+ {"-type", ":type", [{type, Type}]};
+opt({interlace, Interlace}) ->
+ {"-interlace", ":interlace", [{interlace, Interlace}]}.
+
Please sign in to comment.
Something went wrong with that request. Please try again.