LibreOffice Module vcl (master) 1
JpegReader.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
22#include <vcl/graph.hxx>
23#include <vcl/bitmap.hxx>
24
27
29
31{
35};
36
38{
44
45 bool bGray;
46};
47
49{
51 std::optional<Bitmap> mpBitmap;
52 std::optional<AlphaMask> mpIncompleteAlpha;
53
57
59
60public:
61 JPEGReader( SvStream& rStream, GraphicFilterImportFlags nImportFlags );
62 virtual ~JPEGReader() override;
63
64 ReadState Read(Graphic& rGraphic, GraphicFilterImportFlags nImportFlags, BitmapScopedWriteAccess* ppAccess);
65
66 bool CreateBitmap(JPEGCreateBitmapParam const & param);
67
68 Bitmap& GetBitmap() { return *mpBitmap; }
69};
70
71/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ReadState
Definition: JpegReader.hxx:31
@ JPEGREAD_NEED_MORE
Definition: JpegReader.hxx:34
@ JPEGREAD_ERROR
Definition: JpegReader.hxx:33
@ JPEGREAD_OK
Definition: JpegReader.hxx:32
virtual ~JPEGReader() override
Definition: JpegReader.cxx:187
bool mbSetLogSize
Definition: JpegReader.hxx:56
ReadState Read(Graphic &rGraphic, GraphicFilterImportFlags nImportFlags, BitmapScopedWriteAccess *ppAccess)
Definition: JpegReader.cxx:285
tools::Long mnLastPos
Definition: JpegReader.hxx:54
tools::Long mnLastLines
Definition: JpegReader.hxx:55
bool CreateBitmap(JPEGCreateBitmapParam const &param)
Definition: JpegReader.cxx:191
std::optional< AlphaMask > mpIncompleteAlpha
Definition: JpegReader.hxx:52
std::optional< Bitmap > mpBitmap
Definition: JpegReader.hxx:51
Bitmap & GetBitmap()
Definition: JpegReader.hxx:68
SvStream & mrStream
Definition: JpegReader.hxx:50
Graphic CreateIntermediateGraphic(tools::Long nLines)
Definition: JpegReader.cxx:245
JPEGReader(SvStream &rStream, GraphicFilterImportFlags nImportFlags)
Definition: JpegReader.cxx:172
This template handles BitmapAccess the RAII way.
GraphicFilterImportFlags
unsigned long ULong
long Long
tools::ULong density_unit
Definition: JpegReader.hxx:41
tools::ULong nHeight
Definition: JpegReader.hxx:40
tools::ULong Y_density
Definition: JpegReader.hxx:43
tools::ULong nWidth
Definition: JpegReader.hxx:39
tools::ULong X_density
Definition: JpegReader.hxx:42