iSammyC / webp

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

Streaming support for cwebp #191

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi.

Currently cwebp have no support for streaming (I checked latest 0.4.0 version), 
so the only way to encode an image is to put it into the file first.

It means that there is no way to perform webp compression in RAM, e.g.:

curl -s $MYIMG | cwebp -q 75 | somethingelse

Most other image codecs support it (or, at least, all image codecs I worked 
with before).

Original issue reported on code.google.com by lbeschastny on 5 Mar 2014 at 10:43

GoogleCodeExporter commented 9 years ago
this is a partial duplicate of issue 168

I've got an incoming patch to allow cwebp to emit to stdout.

The hard part is reading from stdout, since one need to modify the
third-party libs (libjpeg, libgif, ...) to allow that. It's going to
be more involved...

Original comment by pascal.m...@gmail.com on 7 Mar 2014 at 1:53

GoogleCodeExporter commented 9 years ago
As far as I know, cjpeg converter and jpegtran transcoder utilities, based on 
libjpeg library, support streaming.

Original comment by lbeschastny on 7 Mar 2014 at 2:12

GoogleCodeExporter commented 9 years ago
ImageMagick and GraphicsMagick support streaming for all supported formats, 
including jpeg and gif, and they use the same libjpeg and libgif libraries.

Original comment by lbeschastny on 7 Mar 2014 at 2:28

GoogleCodeExporter commented 9 years ago
submitted the following related changes:

https://gerrit.chromium.org/gerrit/69208
https://gerrit.chromium.org/gerrit/69209

the remaining missing piece is having cwebp support input from 'stdin'.

libjpeg / libgif are probably going to be straightforward, as you mentioned. 
But WIC for Windows
is another reach...

Original comment by pascal.m...@gmail.com on 12 Mar 2014 at 9:08

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I noticed that latest webp build support streaming.

Or, at least, cwebp and dwebp docs are saying so:
https://developers.google.com/speed/webp/docs/cwebp
https://developers.google.com/speed/webp/docs/dwebp

Probably, this issue should be closed now.

Original comment by lbeschas...@iknow.travel on 17 Sep 2014 at 4:32

GoogleCodeExporter commented 9 years ago
Well, looks like cwebp still can't read data from stdin.

The rest works fine.

Original comment by lbeschastny on 19 Sep 2014 at 3:42