wangjunbao / webp

Automatically exported from code.google.com/p/webp
0 stars 0 forks source link

dwebp should support jpg #199

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Convert JPG to WEBP (cwebp)
2. Convert WEBP to JPG (dwebp)

What is the expected output? What do you see instead?
I can convert all jpg to webp without a problem.
I can't convert all webp to webp.

It's should support convert all webp directly to jpg

Why? None will convert their files if there is no viable way to return the same 
format.

I'm doing experiments:

:: CONVERT JPG TO WEBP
set WEBP_HOME=%cd%
set WEBP_PARAMS=-mt -m 6 -progress -metadata all -q 100

FORFILES /p %1 /m *.jpg /c "%WEBP_HOME%\cwebp.exe  %WEBP_PARAMS% @file -o 
@fname.webp"

:: CONVERT WEBP TO PNG
set WEBP_HOME=%cd%
set WEBP_PARAMS=-mt

FORFILES /p %1 /m *.webp /c "%WEBP_HOME%\dwebp.exe %WEBP_PARAMS% @file -o 
@fname.png"

:: CONVERT PNG TO JPEG
set JPEG_PARAMS1="-quality"
set JPEG_Q="98"

FORFILES /p %1 /m *.png /c "cmd /c %WEBP_HOME%\convert.exe %JPEG_PARAMS1% 
%JPEG_Q% @file @fname.jpg" 

Original issue reported on code.google.com by marcomsousa on 12 May 2014 at 1:37

GoogleCodeExporter commented 9 years ago
The convert.exe is from ImageMagick tools.
The produced jpg have (more or less) the same size.
The original jpg, and the produced webp and jpg have the same quality.

I'm now add the exif from webp to jpg
exiftool -tagsFromFile src.webp -exif:all dst.jpg

Original comment by marcomsousa on 12 May 2014 at 1:40

GoogleCodeExporter commented 9 years ago
It should support convert WEBP TO JPG

Original comment by marcomsousa on 12 May 2014 at 2:01

GoogleCodeExporter commented 9 years ago
:: EXIF FROM WEBP TO FINAL JPG
set EXIF_PARAMS1=-tagsFromFile
set EXIF_PARAMS2=-exif:all -overwrite_original
FORFILES /p %1 /m *.webp /c "cmd /c %WEBP_HOME%\exiftool.exe %EXIF_PARAMS1% 
@fname.webp %EXIF_PARAMS2% @fname.jpg"

Original comment by marcomsousa on 12 May 2014 at 2:03

GoogleCodeExporter commented 9 years ago
Issue 176 has been merged into this issue.

Original comment by pascal.m...@gmail.com on 19 Aug 2014 at 1:09

GoogleCodeExporter commented 9 years ago
Issue 176 has been merged into this issue.

Original comment by jz...@google.com on 19 Aug 2014 at 6:33