problem when convert pic to webp format

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
carbon0404
Posts: 17
Joined: 2012-04-11T05:11:30-07:00
Authentication code: 8675308

problem when convert pic to webp format

Post by carbon0404 »

I use the ImageMagick-6.7.9-10 and libwebp-0.2.0 both from source code an suse-like linux system and found two problem:

1.when convert a jpeg file to webp, the output file can be viewed,but file size is not affected by quality param.
Cammand line like: convert -quality 80 a.jpg a.webp

2.when convert a png to webp,the output is awful.cammand line like: convert -quality 80 a.png a.webp.
the next image is the png i used;
Image

when I use the cwebp to do these conversion,everything goes well.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: problem when convert pic to webp format

Post by fmw42 »

I don't know much about webp format, but if it is a pixel format and not vector, then the -quality should come after reading the input image. But I am not sure that -quality is relevant to webp format -- that is I don't know if IM understands what quality means for that format. I believe that -quality only applies to the creation of jpg, miff, or png formats.

see
http://www.imagemagick.org/script/comma ... hp#quality
http://www.imagemagick.org/Usage/basics/#why
carbon0404
Posts: 17
Joined: 2012-04-11T05:11:30-07:00
Authentication code: 8675308

Re: problem when convert pic to webp format

Post by carbon0404 »

fmw42 wrote:I don't know much about webp format, but if it is a pixel format and not vector, then the -quality should come after reading the input image. But I am not sure that -quality is relevant to webp format -- that is I don't know if IM understands what quality means for that format. I believe that -quality only applies to the creation of jpg, miff, or png formats.

see
http://www.imagemagick.org/script/comma ... hp#quality
http://www.imagemagick.org/Usage/basics/#why
What I want is to reduce the file size by quality param.I have run"convert -quality 80 a.jpg a_q80.jpg",where a.jpg is input,the other is output.And the output file is changed according the quality param as I expected,that is if i run "convert -quality 50 a.jpg a._q50.jpg",the output a_q50.jpg is smaller than a_q80.jpg.so the mistake usage of quality before input does not make difference for my problem.if output file format is webp, file size will not be affected by quality param.

As for webp,that is a picture format developed by google,see
https://developers.google.com/speed/webp/

I thought IM should understand quality when it said that it can support webp format.
Cwebp is the cammond tool Libwebp provides.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: problem when convert pic to webp format

Post by magick »

We can reproduce the problem you posted and have a patch in ImageMagick 6.8.0-3 Beta available by sometime tomorrow. Thanks.
carbon0404
Posts: 17
Joined: 2012-04-11T05:11:30-07:00
Authentication code: 8675308

Re: problem when convert pic to webp format

Post by carbon0404 »

magick wrote:We can reproduce the problem you posted and have a patch in ImageMagick 6.8.0-3 Beta available by sometime tomorrow. Thanks.
well,I have tested it with ImageMagick-6.8.0-4.tar.gz,the quality param can affect the output webp file size,but the output webp picture is still wrong.the input basketball has been converted to a big white hole in black background.for I have not found a way to post my attachment,I upload the output to a netdisk,and got a url like following:
http://115.com/file/anxxk95m
you can downloaded the file to see,the used cammand is: "/usr/local/mqq/ImageMagick/bin/convert -quality 80 Basketball.png Basketball_IM80.webp"
I wish I can use the webp support by IM as soon as possible.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: problem when convert pic to webp format

Post by magick »

Webp conversion works for us with 6.8.0-4 under Fedora Linux. We could not try your image file, your link is not working properly.
carbon0404
Posts: 17
Joined: 2012-04-11T05:11:30-07:00
Authentication code: 8675308

Re: problem when convert pic to webp format

Post by carbon0404 »

magick wrote:Webp conversion works for us with 6.8.0-4 under Fedora Linux. We could not try your image file, your link is not working properly.
can u see the input png I posted above? May I have someway(e.g. email?) to send u the input png and the output webp I got?I use 6.8.0-4 and webp2.0 it works well for jpg input,but unacceptable for png with alpha channel.
carbon0404
Posts: 17
Joined: 2012-04-11T05:11:30-07:00
Authentication code: 8675308

Re: problem when convert pic to webp format

Post by carbon0404 »

magick wrote:Webp conversion works for us with 6.8.0-4 under Fedora Linux. We could not try your image file, your link is not working properly.
Image
I have uploaded the output webp file to macrocloud by tencent and got a url:"http://url.cn/4lqMTk".I hope you can access it and see the white hole on black background for the input basketball png with alpha.
carbon0404
Posts: 17
Joined: 2012-04-11T05:11:30-07:00
Authentication code: 8675308

Re: problem when convert pic to webp format

Post by carbon0404 »

magick wrote:Webp conversion works for us with 6.8.0-4 under Fedora Linux. We could not try your image file, your link is not working properly.
I have uploaded the output file again and got a url "http://url.cn/4lqMTk",copy it to a chrome or ie,navigate to the responding page and click the download or in Chinese "下载" ,then you can get the output webp file for the basket png file I posted above
Post Reply