xmubingo / webp

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

webpconv fails on grey scale jpg #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

webpconv duerer.jpg

What is the expected output?
Should work

What do you see instead?
Error in pixWriteWebPwithTargetPSNR: bad or empty input pix

Please use labels and text to provide additional information.
webpconv 0.0.3 on Windows
these converters work:
djpeg -bmp -outfile duerer.bmp duerer.jpg
ffmpeg -i duerer.jpg duerer.png

But these files (which view okay), still fail
c:\work>webpconv duerer.png
processing duerer.png
Output file duerer.webp
Error in pixWriteWebPwithTargetPSNR: bad or empty input pix
pixWriteWebPwithTargetPSNR Failed. See previous error messages. Turn on debug 
build if you aren't seeing enough detailed error messages

c:\work>webpconv duerer.bmp
processing duerer.bmp
Output file duerer.webp
Error in pixReadStreamBmp: invalid imagebytes
Error in pixReadStream: bmp: no pix returned
Error in pixGetInputFormat: pix not defined
Error in pixRead: image not returned
Failed to read image

The image is grey scale
Stream #0.0: Video: png, gray, 90x128

so the bug likely relates to handling of 8 bit images that are not palletized.
converting to rgb first is a work around
ffmpeg -i duerer.jpg -pix_fmt bgr24 duerer.png
c:\work>webpconv duerer.png
processing duerer.png
Output file duerer.webp
Used quality=84

Original issue reported on code.google.com by fbarch...@google.com on 16 Nov 2010 at 6:53

Attachments:

GoogleCodeExporter commented 9 years ago
Yes this is due to the limitation of webp wrapper over leptonica to handle RGB 
images only. I am planning to investigate this further.

Original comment by vikaas.a...@gmail.com on 17 Nov 2010 at 4:55

GoogleCodeExporter commented 9 years ago
Fixed in the version 0.0.4

Original comment by vikaas.a...@gmail.com on 23 Nov 2010 at 10:31

GoogleCodeExporter commented 9 years ago

Original comment by vikaas.a...@gmail.com on 23 Nov 2010 at 10:32