Commit Graph

9 Commits

Author SHA1 Message Date
James Zern
a67ff735a2 normalize example exit status
Use EXIT_SUCCESS / EXIT_FAILURE in most cases as more granularity isn't
useful. For anim_diff, use 0 (success), 1 (image difference) and 2
(error) to align it with other diff utilities (diff, etc.).

Bug: webp:637
Change-Id: I52925de8622a5a4d2141883279d69a1d95ef9b12
2024-05-01 10:38:44 -07:00
James Zern
fab8f9cfcf cosmetics: normalize '*' association
we associate '*' with types rather than variables

Change-Id: Id93ed65272a8a88e604278693e3850649639e9b6
2019-07-26 01:04:09 -07:00
Yannis Guyon
9cf9841b5e libwebp: Unicode command tools on Windows
Define macros in examples/unicode.h to use Unicode argv
on Windows. Keep char everywhere on Unix since it handles
UTF-8 without any change.

Impact:
 - All fopen () and SHCreateStreamOnFile(),
 - All fprintf() printing file paths,
 - All strcmp() used with "-",
 - File path parsing,
 - Gif reading.

Concerned executables from examples/ and extras/:
  anim_diff, anim_dump, vwebp, vwebp_sdl,
  cwebp, dwebp, gif2webp, img2webp,
  webpmux, webpinfo, webp_quality, get_disto

When compiled on Windows with Unicode enabled, webpmux and
img2webp will not work when used with an argument file and
will print "Reading arguments from a file is a feature
unavailable with Unicode binaries."

BUG=webp:398

Change-Id: Ic55d222a3ce1a715f9c4cce57ecbe2705d5ce317
2018-10-17 13:19:40 +02:00
James Zern
a439972175 WIP: list includes as descendants of the project dir
#include "(.|..)/..." -> #include "src/..."

Change-Id: I772880aa097a770722043c8a4393552ba38a89b6
2017-10-10 23:04:05 -07:00
James Zern
ea4824097e makefiles: prune get_disto & webp_quality deps
remove libimagedec from webp_quality, only the webp headers are
inspected. libwebpextras isn't needed by get_disto.

Change-Id: Ib85f97e2c4a9edd97392fd20ef294d1ccc76dda5
2017-01-18 18:10:58 -08:00
Pascal Massimino
57a5e3b6a5 webp_quality should return '0' in case of success.
-> clarify the return value in case of error

Change-Id: I6f1e675c80d237b302fada28e7612a684b931c7a
2016-08-20 21:07:31 +02:00
James Zern
da573cf490 imageio_util: s/ExUtil/ImgIoUtil/
ExUtil(SetBinaryMode|ReadFile|ReadFromStdin|WriteFile|CopyPlane) ->
ImgIoUtil(SetBinaryMode|ReadFile|ReadFromStdin|WriteFile|CopyPlane)

Change-Id: I5497f8fe514347efeb83b8b8866ef334390fc18e
2016-07-21 20:40:11 -07:00
James Zern
bdda5bd4bf split example_util.h
move ExUtil*File to imageio_util.h
ExUtil*WebP* to webpdec.h

string parsing routines remain

Change-Id: I0560c4a74e86710d83bc4b5b234f1b5ef9a86f9d
2016-07-21 19:14:58 -07:00
skal
e8ab6a825a VP8EstimateQuality(): roughty estimate webp bitstream quality factor
This function returns a rough estimation of the quality factor used
for compressing the WebP bitstream.

Simple command line: 'webp_quality [-quiet] in.webp'
should print the estimated quality factor.

Change-Id: Ifba3e489461f5a587003ac9f08cc7556e9b24ac2
2016-07-20 21:50:25 -07:00