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 #ifndef INCLUDED_VCL_SOURCE_FILTER_JPEG_JPEGREADER_HXX
21 #define INCLUDED_VCL_SOURCE_FILTER_JPEG_JPEGREADER_HXX
22 
23 #include <vcl/graph.hxx>
24 #include <vcl/bitmap.hxx>
25 
28 
29 enum class GraphicFilterImportFlags;
30 
32 {
36 };
37 
39 {
45 
46  bool bGray;
47 };
48 
49 class JPEGReader : public GraphicReader
50 {
52  std::unique_ptr<Bitmap> mpBitmap;
53  std::unique_ptr<Bitmap> mpIncompleteAlpha;
54 
58 
60 
61 public:
62  JPEGReader( SvStream& rStream, GraphicFilterImportFlags nImportFlags );
63  virtual ~JPEGReader() override;
64 
65  ReadState Read(Graphic& rGraphic, GraphicFilterImportFlags nImportFlags, BitmapScopedWriteAccess* ppAccess);
66 
67  bool CreateBitmap(JPEGCreateBitmapParam const & param);
68 
69  Bitmap& GetBitmap() { return *mpBitmap; }
70 };
71 
72 #endif // INCLUDED_VCL_SOURCE_FILTER_JPEG_JPEGREADER_HXX
73 
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< Bitmap > mpBitmap
Definition: JpegReader.hxx:52
virtual ~JPEGReader() override
Definition: JpegReader.cxx:187
bool CreateBitmap(JPEGCreateBitmapParam const &param)
Definition: JpegReader.cxx:191
tools::Long mnLastPos
Definition: JpegReader.hxx:55
ReadState Read(Graphic &rGraphic, GraphicFilterImportFlags nImportFlags, BitmapScopedWriteAccess *ppAccess)
Definition: JpegReader.cxx:285
tools::ULong Y_density
Definition: JpegReader.hxx:44
bool mbSetLogSize
Definition: JpegReader.hxx:57
long Long
ReadState
Definition: gifread.cxx:44
This template handles BitmapAccess the RAII way.
JPEGReader(SvStream &rStream, GraphicFilterImportFlags nImportFlags)
Definition: JpegReader.cxx:172
std::unique_ptr< Bitmap > mpIncompleteAlpha
Definition: JpegReader.hxx:53
tools::Long mnLastLines
Definition: JpegReader.hxx:56
unsigned long ULong
SvStream & mrStream
Definition: JpegReader.hxx:51
tools::ULong X_density
Definition: JpegReader.hxx:43
Bitmap & GetBitmap()
Definition: JpegReader.hxx:69
tools::ULong nHeight
Definition: JpegReader.hxx:41
Graphic CreateIntermediateGraphic(tools::Long nLines)
Definition: JpegReader.cxx:245
GraphicFilterImportFlags
tools::ULong density_unit
Definition: JpegReader.hxx:42
tools::ULong nWidth
Definition: JpegReader.hxx:40