diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:54:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 05:54:39 +0000 |
commit | 267c6f2ac71f92999e969232431ba04678e7437e (patch) | |
tree | 358c9467650e1d0a1d7227a21dac2e3d08b622b2 /include/vcl/graphic | |
parent | Initial commit. (diff) | |
download | libreoffice-267c6f2ac71f92999e969232431ba04678e7437e.tar.xz libreoffice-267c6f2ac71f92999e969232431ba04678e7437e.zip |
Adding upstream version 4:24.2.0.upstream/4%24.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'include/vcl/graphic')
-rw-r--r-- | include/vcl/graphic/GraphicMetadata.hxx | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/include/vcl/graphic/GraphicMetadata.hxx b/include/vcl/graphic/GraphicMetadata.hxx new file mode 100644 index 0000000000..33ee9d81c3 --- /dev/null +++ b/include/vcl/graphic/GraphicMetadata.hxx @@ -0,0 +1,68 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ +#ifndef INCLUDED_VCL_GRAPHIC_GRAPHICMETADATA_HXX +#define INCLUDED_VCL_GRAPHIC_GRAPHICMETADATA_HXX + +#include <tools/gen.hxx> +#include <vcl/mapmod.hxx> + +#include <optional> + +// Info class for all supported file formats +enum class GraphicFileFormat +{ + NOT = 0x0000, + BMP = 0x0001, + GIF = 0x0002, + JPG = 0x0003, + PCD = 0x0004, + PCX = 0x0005, + PNG = 0x0006, + TIF = 0x0007, + XBM = 0x0008, + XPM = 0x0009, + PBM = 0x000a, + PGM = 0x000b, + PPM = 0x000c, + RAS = 0x000d, + TGA = 0x000e, + PSD = 0x000f, + EPS = 0x0010, + WEBP = 0x0011, + MOV = 0x00e0, + PDF = 0x00e1, + DXF = 0x00f1, + MET = 0x00f2, + PCT = 0x00f3, + // retired SGF = 0x00f4, + SVM = 0x00f5, + WMF = 0x00f6, + // retired SGV = 0x00f7, + EMF = 0x00f8, + SVG = 0x00f9, + WMZ = 0x00fa, + EMZ = 0x00fb, + SVGZ = 0x00fc, + APNG = 0x00fd +}; +struct GraphicMetadata +{ + Size maPixSize{}; + Size maLogSize{}; + std::optional<Size> maPreferredLogSize = std::nullopt; + std::optional<MapMode> maPreferredMapMode = std::nullopt; + sal_uInt16 mnBitsPerPixel = 0; + sal_uInt16 mnPlanes = 0; + GraphicFileFormat mnFormat = GraphicFileFormat::NOT; + sal_uInt8 mnNumberOfImageComponents = 0; + bool mbIsTransparent = false; + bool mbIsAlpha = false; +}; +#endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |