Commit Graph

16 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
Vincent Rabaud
433c7dca11 Fix static analyzer warnings.
Change-Id: I45f0db2310b1188809963af93240e3d438f807b8
2023-09-14 22:43:45 +02:00
James Zern
e3cb052ca5 webpinfo: fix fourcc comparison w/big-endian
store the recognized fourccs in little-endian order to match how the
fourcc is being read from the file

Bug: webp:548
Change-Id: I9de77db92208709d5e711846908a51e563102fa5
2021-12-22 16:01:54 -08:00
Pascal Massimino
f213abf620 webpinfo: print the number of warnings
otherwise they can go un-noticed (unless you use -diag).

Change-Id: Ic6faaf09e7993002cdae3e998623764fde860351
2021-11-04 17:09:51 +01: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
7a8e814b57 cosmetics: s/color_space/colorspace/
in webpinfo.c, quality_estimate.c.
this form is used elsewhere in the codebase

Change-Id: I40c8202db51a7356e6a14d7e9b25c68153548438
2017-12-08 12:40:18 -08:00
James Zern
126be10950 webpinfo: add -version option
Change-Id: I5861d5ccd2119dd6749dc70b65fd145b5a732f98
2017-11-24 14:21:05 -08:00
James Zern
7945575c92 cosmetics,webpinfo: remove an else after a return
this is redundant with an if block that returns

BUG=webp:355

Change-Id: I66a64a0a4932c5f419f6171684b72088c43e7136
2017-08-26 14:22:39 -07:00
James Zern
7beed2807b add missing ()s to macro parameters
BUG=webp:355

Change-Id: I616c6d3540d6551edd1b1cfdb5bffcf0a044c90f
2017-08-04 17:02:53 -07:00
hui su
af6deaffa0 webpinfo: handle alpha flag mismatch
Throw a warning for false positive vp8x alpha flag;
throw an error for false negative vp8x alpha flag.

BUG=webp:330

Change-Id: I3933588c9d6d76ecaf515517f7506dea299af638
2017-05-23 10:28:25 -07:00
hui su
0d20abb36f webpinfo: tolerate ALPH+VP8L
Change-Id: I63cec2d021c0bfaa188017813813bddaadfbeacb
2017-05-19 14:58:44 -07:00
hui su
dabda70733 webpinfo: add support to parse Alpha bitstream
BUG=webp:330

Change-Id: I9ed0923d19558052d63bdbe93a542c51595fdce7
2017-05-17 09:35:58 -07:00
James Zern
4c1176432a webpinfo: correct background color output, BGRA->ARGB
bgcolor is stored little-endian, byte order is BGRA, with A being the
high byte

Change-Id: I8327380c039634120ee2313044781a5651513dcb
2017-05-16 11:51:44 -07:00
Hui Su
cbc1b92117 webpinfo: add features to parse bitstream header
BUG=webp:330

Change-Id: If2a6ff010219fa25a2b5843725c616ee4dce65a7
2017-05-04 09:18:11 -07:00
James Zern
2cb58ab2d7 webpinfo: output format as a human readable string
Change-Id: I3a3d95bae049ee1053c9d92a364cf1b75f277f81
2017-03-17 00:23:11 -07:00
Pascal Massimino
274daf5415 Add webpinfo tool.
A command line tool to print out the chunk level structure of
WebP files along with basic integrity checks.

BUG=webp:330

Change-Id: Ic69f646f649abb655b1854621d99afedeed158d7
2017-03-14 11:41:17 +01:00