Closed GoogleCodeExporter closed 9 years ago
> -0 1.webp
That should be "-o", not "-0" (minus zero).
Anyhow, this works correctly if the second parameter of -resize isn't omitted.
This works as intended:
cwebp -q 80 -resize 200 0 -noalpha 1.png -o 1.webp
I'd say it should throw an error if either parameter isn't an integer. Right
now it silently eats "-noalpha" and pretends that this was a 0 (= scale
proportionally).
Original comment by googlegr...@kaioa.com
on 9 Sep 2014 at 11:54
Hey sorry it was a typo while I was posting to the forum. But i enter -o on
my command line.
Original comment by siddhart...@gmail.com
on 10 Sep 2014 at 6:18
Yeah I later figured it out. I saw in the docs that if second parameter is
omitted it will scale the image while keeping it in proper proportion.
Hence all the confusion. Docs will be updated right?
-resize width height
Resize the source to a rectangle with size width x height. If either (but
not both) of the width or height parameters is 0, the value will be
calculated preserving the aspect-ratio.
The above is from the docs.
On Wed, Sep 10, 2014 at 11:48 AM, Siddhartha R <siddhartharramesh@gmail.com>
wrote:
Original comment by siddhart...@gmail.com
on 10 Sep 2014 at 6:20
The docs don't say you can omit either, they say you can use a width or height
of 0.
The docs are fine.
However, cwebp should check if those two arguments are actually integers. It
should have told you that "-whatever" isn't an int.
Original comment by googlegr...@kaioa.com
on 10 Sep 2014 at 11:32
This is a good suggestion. There's a patch pending that should address this:
https://gerrit.chromium.org/gerrit/#/c/71527/
Original comment by jz...@google.com
on 11 Sep 2014 at 6:20
This has been merged, thanks again for the report!
e3b343e Merge "examples: warn on invalid numeric parameters"
96d43a8 examples: warn on invalid numeric parameters
Original comment by jz...@google.com
on 12 Sep 2014 at 6:25
Nice! Yeah I misread the omit part. It appeared confusing to me. Maybe I was in
a hurry. But a feature to omit either of width or height is a good thing rather
than explicitly setting it to zero. Thanks!
Too bad IOS and Safari still does not support webp. What is wrong with the
world :(
Original comment by siddhart...@gmail.com
on 12 Sep 2014 at 12:53
Original issue reported on code.google.com by
siddhart...@gmail.com
on 9 Sep 2014 at 11:14