LibreOffice Module vcl (master)  1
PngImageReader.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  */
10 
11 #ifndef INCLUDED_VCL_FILTER_PNGIMAGEREADER_HXX
12 #define INCLUDED_VCL_FILTER_PNGIMAGEREADER_HXX
13 
14 #include <sal/config.h>
15 
16 #include <memory>
17 
18 #include <vcl/dllapi.h>
19 
20 #include <com/sun/star/uno/Reference.hxx>
21 
22 namespace com::sun::star::task
23 {
24 class XStatusIndicator;
25 }
26 
27 class BitmapEx;
28 class SvStream;
29 
30 namespace vcl
31 {
33 {
35  css::uno::Reference<css::task::XStatusIndicator> mxStatusIndicator;
36 
37 public:
38  PngImageReader(SvStream& rStream);
39 
40  // Returns true if image was successfully read without errors.
41  // A usable bitmap may be returned even if there were errors (e.g. incomplete image).
42  bool read(BitmapEx& rBitmap);
43  // Returns a bitmap without indicating if there were errors.
44  BitmapEx read();
45 
46  // Returns the contents of the msOG chunk (containing a Gif image), if it exists.
47  // Does not change position in the stream.
48  static std::unique_ptr<sal_uInt8[]> getMicrosoftGifChunk(SvStream& rStream,
49  sal_Int32* chunkSize = nullptr);
50 };
51 
52 } // namespace vcl
53 
54 #endif
55 
56 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Reference< css::task::XStatusIndicator > mxStatusIndicator
#define VCL_DLLPUBLIC
Definition: dllapi.h:29