Permalink
Browse files

image-sampled-output-cmdline.lua: Fix -s/--size option

It was assigning the height to the width in case where the
WIDTHxHEIGHT syntax was used.

Also remove a debugging printf.
  • Loading branch information...
snogglethorpe committed Apr 8, 2012
1 parent cc9fe0d commit 40cdd1bc1c88195178d56b17844a3f8724be7900
Showing with 1 addition and 2 deletions.
  1. +1 −2 image-sampled-output-cmdline.lua
@@ -32,11 +32,10 @@ function img_output_cmdline.option_parser (params, default_aspect_ratio)
else
local w, h = string.match (arg, "^(%d+)%s*[,x]%s*(%d+)$")
w = tonumber (w)
- w = tonumber (h)
+ h = tonumber (h)
if not w or not h then
cmdlineparser.error ("invalid size option \""..arg.."\"")
end
- print ("w", w, "h", h)
params.width = w
params.height = h
end

0 comments on commit 40cdd1b

Please sign in to comment.