Ask Your Question
0

Problems with .webp files

asked 2015-03-14 08:40:27 -0600

updated 2015-03-14 09:44:18 -0600

berak gravatar image

I am struggling to work with webp files - everything works fine with .png or .jpg. Did anybody else have the same issues?

e.g.

image = cv2.imread(imagePath) # Always returned NoneType so I replaced it with 
cv2.cv.LoadImage(imagePath)  # Returns 'No such file or directory:' where actually the file exists + python opens it if I use open

Any advice? Any examples to working with webp files?

Thanks.

edit retag flag offensive close merge delete

Comments

1

try a : print cv2.getBuildInformation() . you should see something similar to:

  Media I/O:
    ZLib:                        build (ver 1.2.8)
    JPEG:                        build (ver 90)
    WEBP:                        build (ver 0.3.1)
    PNG:                         build (ver 1.5.12)
    TIFF:                        build (ver 42 - 4.0.2)
    JPEG 2000:                   NO
    OpenEXR:                     NO
    GDAL:                        NO

if it says, WEBP NO, it means, your cv2.pyd was build without support for it. (it's one of the 3rdParty libs, that have to be enabled during build)

(oh, and btw, avoid anything from deprecated cv2.cv. it will be gone in the next version)

berak gravatar imageberak ( 2015-03-14 09:44:02 -0600 )edit

sorry, can't help you with installers of any kind.

i guess, you will have to build from src in that case.

berak gravatar imageberak ( 2015-03-14 10:40:13 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-03-14 10:24:15 -0600

Thanks @berak, WEBP isn't even specified. I've installed version 2.4.11 from installer since I didn't want to compile it myself. Where can I find a version that would support WEBP? How do I configure the installer?

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-03-14 08:40:27 -0600

Seen: 1,474 times

Last updated: Mar 14 '15