Skip to content

Commit

Permalink
image-sampled-output-cmdline.lua: Fix -s/--size option
Browse files Browse the repository at this point in the history
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 40cdd1b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions image-sampled-output-cmdline.lua
Expand Up @@ -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
Expand Down

0 comments on commit 40cdd1b

Please sign in to comment.