Commit Graph

161 Commits

Author SHA1 Message Date
Pascal Massimino
2ab4b72f53 EXPERIMENTAL: add support for alpha channel
This is a (minor) bitstream change: if the 'color_space' bit is set to '1'
(which is normally an undefined/invalid behaviour), we add extra data at the
end of partition #0 (so-called 'extensions')

Namely, we add the size of the extension data as 3 bytes (little-endian),
followed by a set of bits telling which extensions we're incorporating.
The data then _preceeds_ this trailing tags.

This is all experimental, and you'll need to have
'#define WEBP_EXPERIMENTAL_FEATURES' in webp/types.h to enable this code
(at your own risk! :))

Still, this hack produces almost-valid WebP file for decoders that don't
check this color_space bit. In particular, previous 'dwebp' (and for instance
Chrome) will recognize this files and decode them, but without the alpha
of course. Other decoder will just see random extra stuff at the end of
partition #0.

To experiment with the alpha-channel, you need to compile on Unix platform
and use PNGs for input/output.

If 'alpha.png' is a source with alpha channel, then you can try (on Unix):

  cwebp alpha.png -o alpha.webp
  dwebp alpha.webp -o test.png

cwebp now has a '-noalpha' flag to ignore any alpha information from the
source, if present.

More hacking and experimenting welcome!

Change-Id: I3c7b1fd8411c9e7a9f77690e898479ad85c52f3e
2011-04-25 23:29:39 -07:00
Pascal Massimino
276ae82512 Remove files not mean to be in git, and update .gitignore
Makes things lighter at the expense of requiring the user
to be up-to-date for autotools.

patch by Jan Engelhardt (jengelh at medozas dot de)

Change-Id: Icfcab2d899828a213d9fade0dab350dacd0c070a
2011-03-29 09:07:06 -07:00
Jan Engelhardt
2486845580 build: prepare libwebp.pc
libwebp.pc needs to be created from libwebp.pc.in, or installation
will fail.

Change-Id: If0afe8d5c722b3394778b309dc0b676e603a4282
2011-03-28 11:38:47 -07:00
Pascal Massimino
c5fa726e18 build: add pkgconfig files
patch by Jan Engelhardt (jengelh at medozas dot de)

fixes http://code.google.com/p/webp/issues/detail?id=64

Change-Id: I5b3bc9b88af967e48b949d9c85daacda45693b1f
2011-03-26 10:15:44 -07:00
Pascal Massimino
dd60138d20 add man pages for cwebp(1) and dwebp(1)
Change-Id: I450717fc82fff19f16df75aca6a9a567773afd00
2011-03-01 16:07:57 -08:00
Pascal Massimino
f61d14aabf a WebP encoder
converts PNG & JPEG to WebP

This is an experimental early version, with lot of room
of later optimizations in both speed and quality.

Compile with the usual `./configure && make`
Command line example is examples/cwebp

Usage:

   cwebp [options] -q quality input.png -o output.webp

where 'quality' is between 0 (poor) to 100 (very good).
Typical value is around 80.

More encoding options with 'cwebp -longhelp'

Change-Id: I577a94f6f622a0c44bdfa9daf1086ace89d45539
2011-02-18 23:54:59 -08:00
Pascal Massimino
1dc4611a3a add support for PNG output (default)
regularize include guards

Change-Id: Ia1d0fa49c8c98e2c11f775b839d04a24e5450170
2011-01-31 22:25:44 -08:00
Pascal Massimino
d2cf04e48e move Makefile.am one level below, to src/dec
fix typos here and there
dwebp is now an installed program

autotools = lot of fun :)

Change-Id: Idd12a944dd8d6614e393122c4378e1f7ecf0e209
2011-01-07 18:16:04 -08:00
Pascal Massimino
6421a7a4fb move the decoder sourcetree to a sub-location src/dec
to make room for future libs sources

also extract the types declaration into its own types.h file

Change-Id: I8bae8a323a479a29375cf509792228ae6af51c7a
2011-01-06 08:57:14 -08:00
Pierre Joye
c8d15efa12 convert to ANSI-C 2010-10-06 14:37:28 -07:00
Pascal Massimino
c3f41cb47e Initial commit
Change-Id: I4712afb3912625e7aaccfa5160dcf78ee252f159
2010-09-30 09:55:07 -04:00