diff options
author | Aaron Carlisle <carlisle.b3d@gmail.com> | 2022-03-25 01:24:06 +0300 |
---|---|---|
committer | Aaron Carlisle <carlisle.b3d@gmail.com> | 2022-03-25 01:24:06 +0300 |
commit | 4fd0a69d7ba86e92390c421a745c6f32f1050c31 (patch) | |
tree | e98005f5a099665d09296569fbee1ef5e72b1d1e /source/blender/imbuf/intern/util.c | |
parent | 07846b31f34caa88244d192ee7d3aa6c057ac602 (diff) |
ImBuf: Add support for WebP image format
Currently only supports single image frames (no animation possible).
If quality slider is set to 100 then lossless compression will be used,
otherwise lossy compression is used.
Gives about 35% reduction of filesize save when re-saving splash screens with lossless
compression.
Also saves much faster, up to 15x faster than PNG with a better compression ratio as a plus.
Note, this is currently left disabled until we have WebP libs (see T95206)
For testing precompiled libs can be downloaded from Google:
https://storage.googleapis.com/downloads.webmproject.org/releases/webp/index.html
Differential Revision: https://developer.blender.org/D1598
Diffstat (limited to 'source/blender/imbuf/intern/util.c')
-rw-r--r-- | source/blender/imbuf/intern/util.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c index 241f1a736f4..45b50c866fe 100644 --- a/source/blender/imbuf/intern/util.c +++ b/source/blender/imbuf/intern/util.c @@ -41,12 +41,12 @@ #define UTIL_DEBUG 0 const char *imb_ext_image[] = { - ".png", ".tga", ".bmp", ".jpg", ".jpeg", ".sgi", ".rgb", ".rgba", + ".png", ".tga", ".bmp", ".jpg", ".jpeg", ".sgi", ".rgb", ".rgba", #ifdef WITH_TIFF - ".tif", ".tiff", ".tx", + ".tif", ".tiff", ".tx", #endif #ifdef WITH_OPENJPEG - ".jp2", ".j2c", + ".jp2", ".j2c", #endif #ifdef WITH_HDR ".hdr", @@ -55,13 +55,16 @@ const char *imb_ext_image[] = { ".dds", #endif #ifdef WITH_CINEON - ".dpx", ".cin", + ".dpx", ".cin", #endif #ifdef WITH_OPENEXR ".exr", #endif #ifdef WITH_OPENIMAGEIO - ".psd", ".pdd", ".psb", + ".psd", ".pdd", ".psb", +#endif +#ifdef WITH_WEBP + ".webp", #endif NULL, }; |