diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2022-01-13 15:59:49 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-01-31 10:44:44 +0100 |
commit | 89a98df054cfedc082ddcc6e6e38351e3f939f0c (patch) | |
tree | 376faf3dcf3c2d94fa64588372faf156d2a9de1e /vcl/source/graphic/UnoGraphicDescriptor.cxx | |
parent | 58d74724631425b083c4bd3d316a0a4bc1af4eb3 (diff) |
support for the WebP image format (tdf#114532)
This commit implements a WebP reader and writer for both lossless
and lossy WebP, export dialog options for selecting lossless/lossy
and quality for lossy, and various internal support for the format.
Since writing WebP to e.g. ODT documents would make those images
unreadable by previous versions with no WebP support, support
for that is explicitly disabled in GraphicFilter, to be enabled
somewhen later.
Change-Id: I9b10f6da6faa78a0bb74415a92e9f163c14685f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128978
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/source/graphic/UnoGraphicDescriptor.cxx')
-rw-r--r-- | vcl/source/graphic/UnoGraphicDescriptor.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/vcl/source/graphic/UnoGraphicDescriptor.cxx b/vcl/source/graphic/UnoGraphicDescriptor.cxx index 6f65828fe992..e966df7e64bd 100644 --- a/vcl/source/graphic/UnoGraphicDescriptor.cxx +++ b/vcl/source/graphic/UnoGraphicDescriptor.cxx @@ -127,6 +127,7 @@ void GraphicDescriptor::implCreate( SvStream& rIStm, const OUString* pURL ) case GraphicFileFormat::RAS: pMimeType = MIMETYPE_RAS; cType = graphic::GraphicType::PIXEL; break; case GraphicFileFormat::TGA: pMimeType = MIMETYPE_TGA; cType = graphic::GraphicType::PIXEL; break; case GraphicFileFormat::PSD: pMimeType = MIMETYPE_PSD; cType = graphic::GraphicType::PIXEL; break; + case GraphicFileFormat::WEBP: pMimeType = MIMETYPE_WEBP; cType = graphic::GraphicType::PIXEL; break; case GraphicFileFormat::EPS: pMimeType = MIMETYPE_EPS; cType = graphic::GraphicType::VECTOR; break; case GraphicFileFormat::DXF: pMimeType = MIMETYPE_DXF; cType = graphic::GraphicType::VECTOR; break; @@ -298,6 +299,7 @@ void GraphicDescriptor::_getPropertyValues( const comphelper::PropertyMapEntry** case GfxLinkType::NativeWmf: pMimeType = MIMETYPE_WMF; break; case GfxLinkType::NativeMet: pMimeType = MIMETYPE_MET; break; case GfxLinkType::NativePct: pMimeType = MIMETYPE_PCT; break; + case GfxLinkType::NativeWebp: pMimeType = MIMETYPE_WEBP; break; // added Svg mimetype support case GfxLinkType::NativeSvg: pMimeType = MIMETYPE_SVG; break; |